diff options
author | Martin Odersky <odersky@gmail.com> | 2015-04-17 10:48:51 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-04-17 10:48:51 +0200 |
commit | e0a0c39a2578eca9927fa4c435ce14654422a825 (patch) | |
tree | 2dca2b5ae678c773af15c9d56eec429c320d1245 /tests/pos/i480.scala | |
parent | 85b48de299fcdba17397c59c9bcaa0a69da93350 (diff) | |
download | dotty-e0a0c39a2578eca9927fa4c435ce14654422a825.tar.gz dotty-e0a0c39a2578eca9927fa4c435ce14654422a825.tar.bz2 dotty-e0a0c39a2578eca9927fa4c435ce14654422a825.zip |
Fix #480 in LambdaLift
Fix two errors, where the first masked the second:
1) Variables defined in a method are not free variables of that method. This was mispredicated before
and caused liftedOwner to be updated to the class enclosing the method, thereby preventing any method
that refers to a local parameter or symbol to be hoisted.
Once this was fixed, methods were hoisted too far out. Test case in #480a, which takes code from Definitions.
This was fixed by
2) markFree is updated to do an additional narrowLiftedOwner so that, if a free variable gets a proxy
in an enclosing class, any inner classes and methods are kept within that class.
Diffstat (limited to 'tests/pos/i480.scala')
0 files changed, 0 insertions, 0 deletions