Skip to content
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] follow simple assignments #11181

Merged
merged 1 commit into from
Apr 29, 2024
Merged

Conversation

carljm
Copy link
Contributor

@carljm carljm commented Apr 27, 2024

Summary

Follow simple assignments in type resolution.

Test Plan

cargo test

@carljm carljm requested a review from MichaReiser April 27, 2024 17:55
crates/red_knot/src/symbols.rs Outdated Show resolved Hide resolved
crates/red_knot/src/symbols.rs Show resolved Hide resolved
crates/red_knot/src/symbols.rs Outdated Show resolved Hide resolved
Comment on lines +86 to +92
let parsed = db.parse(file_id);
let ast = parsed.ast();
let node = node_key.resolve_unwrap(ast.as_any_node_ref());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can see how resolving definitions might become expensive 😆

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it would be awesome if we could directly reference AST nodes instead of having to search to resolve :/

Copy link
Contributor

github-actions bot commented Apr 27, 2024

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@MichaReiser MichaReiser added the internal An internal refactor or improvement label Apr 27, 2024
@MichaReiser
Copy link
Member

You know have to label your PRs or they'll show up in the changelog 😆

@carljm
Copy link
Contributor Author

carljm commented Apr 27, 2024

Ugh, yes I know, I did remember to label one of them today! #11176

@carljm
Copy link
Contributor Author

carljm commented Apr 27, 2024

I think I would have remembered before merging :)

@carljm carljm merged commit c2495fd into cjm/follow-class Apr 29, 2024
19 checks passed
@carljm carljm deleted the cjm/follow-assign branch April 29, 2024 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal An internal refactor or improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants