diff options
author | Martin Odersky <odersky@gmail.com> | 2015-06-26 17:39:51 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-06-26 18:17:56 +0200 |
commit | b50f9abef672221a4706f0819eca2cfc1068751c (patch) | |
tree | 4c0efb035ed19d2e52ed6c03f39835058a2e9e54 /src | |
parent | ef0184826b784fda9e2e1ef9aab31cab692cf3d2 (diff) | |
download | dotty-b50f9abef672221a4706f0819eca2cfc1068751c.tar.gz dotty-b50f9abef672221a4706f0819eca2cfc1068751c.tar.bz2 dotty-b50f9abef672221a4706f0819eca2cfc1068751c.zip |
Drop Module flag from lifted symbols.
Reason: A lifted module is no longer a module (i.e. singleton object) in the scope
to which it is lifted.
Fixes #689.
Diffstat (limited to 'src')
-rw-r--r-- | src/dotty/tools/dotc/transform/LambdaLift.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/transform/LambdaLift.scala b/src/dotty/tools/dotc/transform/LambdaLift.scala index 043c92737..cefd283be 100644 --- a/src/dotty/tools/dotc/transform/LambdaLift.scala +++ b/src/dotty/tools/dotc/transform/LambdaLift.scala @@ -309,7 +309,8 @@ class LambdaLift extends MiniPhase with IdentityDenotTransformer { thisTransform local.copySymDenotation( owner = newOwner, name = newName(local), - initFlags = local.flags &~ InSuperCall | Private | maybeStatic, + initFlags = local.flags &~ (InSuperCall | Module) | Private | maybeStatic, + // drop Module because class is no longer a singleton in the lifted context. info = liftedInfo(local)).installAfter(thisTransform) if (local.isClass) for (member <- local.asClass.info.decls) |