diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2014-03-10 11:26:07 +0100 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2014-03-10 19:26:11 +0100 |
commit | 814ecad8a0f4830ce97112e00e4823a2b5c047e0 (patch) | |
tree | 1b03dc794d67538c7b11ac82c703bf9cc21c59f2 /test/files/pos | |
parent | 40b7832823d5e1cc39397b8960e62e0283bb0502 (diff) | |
download | scala-814ecad8a0f4830ce97112e00e4823a2b5c047e0.tar.gz scala-814ecad8a0f4830ce97112e00e4823a2b5c047e0.tar.bz2 scala-814ecad8a0f4830ce97112e00e4823a2b5c047e0.zip |
SI-8363 Disable -Ydelambdafy:method in constructor position
As @magarciaEPFL has done in his experimental optimizer [1], we can
avoid running into limitations of lambdalift (either `VerifyError`s,
ala SI-6666, or compiler crashes, such as this bug), by using the
old style of "inline" lambda translation when in a super- or self-
construtor call.
We might be able to get these working later on, but for now we
shouldn't block adoption of `-Ydelamndafy:method` for this corner
case.
[1] https://github.com/magarciaEPFL/scala/blob/GenRefactored99sZ/src/compiler/scala/tools/nsc/transform/UnCurry.scala#L227
Diffstat (limited to 'test/files/pos')
-rw-r--r-- | test/files/pos/t8363.flags | 1 | ||||
-rw-r--r-- | test/files/pos/t8363.scala | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/test/files/pos/t8363.flags b/test/files/pos/t8363.flags new file mode 100644 index 0000000000..48b438ddf8 --- /dev/null +++ b/test/files/pos/t8363.flags @@ -0,0 +1 @@ +-Ydelambdafy:method diff --git a/test/files/pos/t8363.scala b/test/files/pos/t8363.scala new file mode 100644 index 0000000000..639faf4120 --- /dev/null +++ b/test/files/pos/t8363.scala @@ -0,0 +1,7 @@ +class C(a: Any) +class Test { + def foo: Any = { + def form = 0 + class C1 extends C(() => form) + } +} |