-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[red-knot] Resolve references in eager nested scopes eagerly #16079
Merged
+645
−47
Merged
Changes from 1 commit
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
9d101d6
Improve encapsulation of `Scope`
AlexWaygood 2789cd0
add a failing test
AlexWaygood 23ed82d
existing tests pass
AlexWaygood 5f566cd
Get a naive version working
AlexWaygood 6ea3655
another passing test
AlexWaygood 1e5ae86
another passing test
AlexWaygood 16b63ba
add a failing test
AlexWaygood f4904b1
wip
AlexWaygood b8ffa78
Merge branch 'main' into alex/eager-scopes
dcreager e5eaab9
Fix merge conflicts
dcreager a3ea477
Fix type inference merge conflicts
dcreager 4cd5ae0
This unknown is because there is no declared type
dcreager 0c394ab
Add more commentary
dcreager df91210
Look for eager references in any enclosing scope, not just innermost
dcreager 06f76ae
clippy
dcreager cf78c49
linter
dcreager 54efbbe
Add a bunch of nested examples
dcreager 7e0ef53
Merge branch 'main' into alex/eager-scopes
dcreager be8f9eb
lint
dcreager 908d3e2
doc typo
dcreager a63c6e6
comment
dcreager 5db470e
Merge branch 'main' into alex/eager-scopes
dcreager 28d6513
Don't reexport UseDefMap
dcreager f72c268
Don't impl Deref
dcreager f647032
Expect all eager scopes to have nested ID
dcreager 4eb38fd
Extract eager symbol lookup into separate function
dcreager de73d08
Name nit
dcreager dfb7384
Rework eager bindings storage
dcreager 95a6bb8
Remove unneeded mem::take
dcreager e13ac91
Move more lookup logic into the semantic index builder
dcreager 71194ba
Only consider bindings
dcreager 3b5277e
Add test for class definition bindings
dcreager fc93843
Revert AstIds changes
dcreager 4556f4d
Clarify expect message
dcreager 03ce733
Move clone
dcreager fc6c009
Don't snapshot eager bindings for bound symbols
dcreager 40d5be2
Add tests for deferred annotations
dcreager 3cf2308
Add failing tests for eager scopes in global scope
dcreager 8a2449f
Handle eager lookups in global scope
dcreager 576f54d
Remove unneeded track_caller
dcreager c344871
Deferred expressions are always lazy
dcreager 260756b
Remove stale TODO
dcreager b24cf07
Remove another stale track_caller
dcreager 4931bd4
Remove stale clone/copy
dcreager 1a7cbe8
Another track_caller
dcreager a55a01a
Merge branch 'main' into alex/eager-scopes
dcreager d76d362
Don't save eager bindings in class definitions
dcreager c65011f
Make test iterables non-empty
dcreager 889a64b
Verify that eager bindings are used in public types of class attrs
dcreager 888ba7b
Add technically incorrect test for generators evaluated later
dcreager cb22523
Add link to generator spec
dcreager 86a243c
lint
dcreager f474b43
fix heading
dcreager 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 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.
these are excellent, thank you!