-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Self Type #2193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Self Type #2193
Changes from all commits
Commits
Show all changes
56 commits
Select commit
Hold shift + click to select a range
04934c3
move things around
elazarg 4eb5f75
first test pass. no override yet
elazarg 181ff09
selftypeClass test pass
elazarg 25e104a
Simple override
elazarg 5e72623
Simple override
elazarg 29d2e0f
test super() and rename self_type()
elazarg 4d5d479
more tests
elazarg ea6c485
unneeded changes
elazarg 00596a6
merge
elazarg 39615c2
some more tests
elazarg f8875f9
recursive instantiation
elazarg 9ae3bf9
add implicit bound
elazarg b29bf87
add tests: prohibit overriding without selftype
elazarg f097967
Merge
elazarg 747c5b2
Merge
elazarg 9b68a2f
minor
elazarg 65d6428
Merge
elazarg 6c161b9
fix comment
elazarg 1cae034
rename: self->cls
elazarg 733edc1
Fix tests, separate binding from the classes
elazarg 91946e2
Merge upstream into self_type
elazarg abcb094
add Guido's test
elazarg 9f831c4
move tests to dedicated file
elazarg aade1ed
move tests to dedicated file
elazarg a6a0a3b
Merge upstream
elazarg 8e81051
pass report_type to instantiate
elazarg a9b0b68
send report_type to classmethod
elazarg ec0f33a
add missing file
elazarg 09cd7bc
more report type
elazarg 8b242e2
support super()
elazarg a8be2a6
avoid partial types when testing static access
elazarg 3055ab0
remove comment
elazarg 72af252
Merge remote-tracking branch 'upstream/master' into self_type
elazarg bb2ac78
use existing machinery; still partial types
elazarg 5f26cac
do not trigger the .erased flag
elazarg 1f44c73
do not trigger the .erased flag
elazarg fcbcf4b
Fix issue with t.variables. adapt SelfTypeBound
elazarg 860c96a
minor
elazarg b078d61
some override checking: instantiate with fillvars(self)
elazarg fc29a3a
Merge remote-tracking branch 'upstream/master' into self_type
elazarg 2299a00
forgotten file
elazarg 137f452
initialize mutable in __init__
elazarg 4bcbf59
Rename report_type, Add docstrings etc.
elazarg 6155c7f
minor doc fix
elazarg 47e5e2f
remove binder hack
elazarg 00ae83d
Merge remote-tracking branch 'upstream/master' into self_type
elazarg 30f847e
example for actual_type
elazarg c152c20
avoid crush in super(); document
elazarg 4f2017e
lint
elazarg fddbba0
comment for fill_typevars
elazarg 3cf8ecf
comment for fill_typevars
elazarg 707da4e
rename actual_self, use declared_type in analyze_super
elazarg 48e139d
test for erased types
elazarg 25b84f8
lint
elazarg 8944ff1
Revert accidental deletion from doc
elazarg 9221001
add warning for unsafe testcase
elazarg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add comment about needing to the type variable check recursively for the argument types. For example,
Iteratble[T]
is not a valid argument type ifT
is covariant.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added, though I am not entirely sure I understood