diff options
author | Paul Phillips <paulp@improving.org> | 2009-10-22 21:59:37 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2009-10-22 21:59:37 +0000 |
commit | 92cfcd43997dc090edc35029ada027ed986a25e2 (patch) | |
tree | fecd6bb4b011a0b50849ebfb95f5ece52fa39cb0 /src/compiler | |
parent | dab03ce57930c24534e46664b676eab1928ca34a (diff) | |
download | scala-92cfcd43997dc090edc35029ada027ed986a25e2.tar.gz scala-92cfcd43997dc090edc35029ada027ed986a25e2.tar.bz2 scala-92cfcd43997dc090edc35029ada027ed986a25e2.zip |
The last patch to work around #1909 caught one ...
The last patch to work around #1909 caught one brand of lifts but not
another. Better now and another test case.
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/transform/LambdaLift.scala | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/LambdaLift.scala b/src/compiler/scala/tools/nsc/transform/LambdaLift.scala index d962dba63f..69f6cc718e 100644 --- a/src/compiler/scala/tools/nsc/transform/LambdaLift.scala +++ b/src/compiler/scala/tools/nsc/transform/LambdaLift.scala @@ -341,6 +341,10 @@ abstract class LambdaLift extends InfoTransform { private def liftDef(tree: Tree): Tree = { val sym = tree.symbol + // A similar check is in UnCurry. + if (sym.owner.isAuxiliaryConstructor && sym.isMethod) + unit.error(tree.pos, "Implementation restriction: auxiliary constructor calls may not use expressions which require lifting.") + sym.owner = sym.owner.enclClass if (sym.isClass) sym.owner = sym.owner.toInterface if (sym.isMethod) sym setFlag LIFTED |