-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix owners of AsFunction applied expressions #4139
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
Fix owners of AsFunction applied expressions #4139
Conversation
@@ -143,7 +143,7 @@ object PickledQuotes { | |||
case tree: Ident if tree.symbol == paramSym => x1Ref().withPos(tree.pos) | |||
case _ => super.transform(tree) | |||
} | |||
}.transform(ddef.rhs) | |||
}.transform(ddef.rhs).changeOwner(ddef.symbol, ctx.owner) |
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.
To be more efficient, you can replace your TreeMap by a TreeTypeMap(oldOwners = ..., newOwners = ...), and avoid the need for changeOwner (which would create its own TreeTypeMap)
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.
Will change it
4f51005
to
0edd3cb
Compare
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, but the tests are failing.
Tests are failing on maser :( @odersky told me he already has a fix for it. |
Cherry-picked likely fix in #4141. |
And new build at http://dotty-ci.epfl.ch/lampepfl/dotty/3824 |
0edd3cb
to
acc662e
Compare
No description provided.