-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Rust: Small type inference tweaks #19038
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
Conversation
| Declaration getTarget() { | ||
| result = | ||
| [ | ||
| CallExprImpl::getResolvedFunction(this).(AstNode), |
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.
Note, this line calls getResolvedFunction and casts to AstNode. The next line calls getResolvedFunction and calls to Struct. Seems like the later will always be included in the former.
hvitved
left a comment
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.
LGTM, just one question.
| println!("{:?}", x.a); | ||
| } | ||
|
|
||
| fn generic_field_access() { |
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.
Do all the expressions in this test have correctly inferred types (I didn't bother to check the .expected file)?
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.
I believe so, yes :)
|
I've merged main. |
Just some small changes I made when reading through the type inference implementation.