-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Remove bindings from Inlined tree #6087
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
Remove bindings from Inlined tree #6087
Conversation
2e4383f
to
ae555be
Compare
da82756
to
e6f4452
Compare
// If the return type of an inline function is a singleton type of a parameter (like in `DottyPredef.the`) | ||
// the expansion will be `{ val x = y; (x: x.type) }`. We ascribe the type to itself widening the | ||
// local TermRef of the binding `{ val x = y; (x: y.type) }`. | ||
tpd.Typed(finalExpansion, TypeTree(ctx.typer.avoidingType(finalExpansion, finalBindings))).withSpan(finalExpansion.span) |
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.
Here I had to add some extra logic to avoid type refs of the binding.
Will need rebase once #6066 is merged. |
e6f4452
to
48c6a0e
Compare
Rebased |
What's the reason for this change ? |
Mostly remove unessesary complexity and some code duplication. |
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.
Previously, bindings got the position of the calling context, instead of a position in the inlined code that was called. How is this handled now? I did not see any code to account for the change.
Indeed, we are missing some |
The positions do have the correct source/span, we already set them correctly. I will need to add some extra assertions on the |
da6a5aa
to
82e917d
Compare
82e917d
to
78807dc
Compare
No description provided.