summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorHubert Plociniczak <hubert.plociniczak@epfl.ch>2009-10-28 17:06:48 +0000
committerHubert Plociniczak <hubert.plociniczak@epfl.ch>2009-10-28 17:06:48 +0000
commitcc934ee7bb181645d4436eb923f7eb843b7c259d (patch)
treec8bc73b1b74a56cc30fc60d8f0b5f01509228917 /src/compiler
parent03e717bdc79ddc2ad7a603698241fe39c9255a8a (diff)
downloadscala-cc934ee7bb181645d4436eb923f7eb843b7c259d.tar.gz
scala-cc934ee7bb181645d4436eb923f7eb843b7c259d.tar.bz2
scala-cc934ee7bb181645d4436eb923f7eb843b7c259d.zip
Fix for #1909
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/nsc/transform/LambdaLift.scala6
-rw-r--r--src/compiler/scala/tools/nsc/transform/UnCurry.scala5
2 files changed, 2 insertions, 9 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/LambdaLift.scala b/src/compiler/scala/tools/nsc/transform/LambdaLift.scala
index 69f6cc718e..a6e639b8e7 100644
--- a/src/compiler/scala/tools/nsc/transform/LambdaLift.scala
+++ b/src/compiler/scala/tools/nsc/transform/LambdaLift.scala
@@ -341,10 +341,8 @@ 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.")
-
+ if (sym.owner.isAuxiliaryConstructor && sym.isMethod) // # bug 1909
+ sym setFlag STATIC
sym.owner = sym.owner.enclClass
if (sym.isClass) sym.owner = sym.owner.toInterface
if (sym.isMethod) sym setFlag LIFTED
diff --git a/src/compiler/scala/tools/nsc/transform/UnCurry.scala b/src/compiler/scala/tools/nsc/transform/UnCurry.scala
index bc9c788804..eec523a2b8 100644
--- a/src/compiler/scala/tools/nsc/transform/UnCurry.scala
+++ b/src/compiler/scala/tools/nsc/transform/UnCurry.scala
@@ -485,11 +485,6 @@ abstract class UnCurry extends InfoTransform with TypingTransformers {
def liftTree(tree: Tree) = {
if (settings.debug.value)
log("lifting tree at: " + (tree.pos))
-
- // Until/unless #1909 is fixed, much better to not compile than to fail at runtime.
- if (currentOwner.isAuxiliaryConstructor)
- unit.error(tree.pos, "Implementation restriction: auxiliary constructor calls may not use expressions which require lifting.")
-
val sym = currentOwner.newMethod(tree.pos, unit.fresh.newName(tree.pos, "liftedTree"))
sym.setInfo(MethodType(List(), tree.tpe))
new ChangeOwnerTraverser(currentOwner, sym).traverse(tree)