diff options
author | Guillaume Martres <smarter@ubuntu.com> | 2015-05-30 22:20:03 +0200 |
---|---|---|
committer | Guillaume Martres <smarter@ubuntu.com> | 2015-05-30 22:25:12 +0200 |
commit | 3d240ad40ccfb570174ec9758bfe68ba4e91eefb (patch) | |
tree | 6df766cfa7dbb64f34215c6d6139f45e494a3008 /src/dotty/tools/dotc/Compiler.scala | |
parent | cafd71af4902c76561f27a479c14e53729600bb9 (diff) | |
download | dotty-3d240ad40ccfb570174ec9758bfe68ba4e91eefb.tar.gz dotty-3d240ad40ccfb570174ec9758bfe68ba4e91eefb.tar.bz2 dotty-3d240ad40ccfb570174ec9758bfe68ba4e91eefb.zip |
Fix ElimStaticThis#transformIdent
- Only transform static methods which are inside module classes.
- Make sure that the prefix of the underlying type of the Ident
is a ThisType of the current module class. For example in
"scala.Int.box(42)", "box" is an Ident whose underlying type is
"TermRef(ThisType(TypeRef(ThisType(TypeRef(NoPrefix,scala)),Int$)),box)",
but we should not trigger an assertion in this case.
Diffstat (limited to 'src/dotty/tools/dotc/Compiler.scala')
-rw-r--r-- | src/dotty/tools/dotc/Compiler.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/Compiler.scala b/src/dotty/tools/dotc/Compiler.scala index d7ef44144..41e77c61f 100644 --- a/src/dotty/tools/dotc/Compiler.scala +++ b/src/dotty/tools/dotc/Compiler.scala @@ -67,8 +67,8 @@ class Compiler { new Constructors, new FunctionalInterfaces), List(new LambdaLift, // in this mini-phase block scopes are incorrect. No phases that rely on scopes should be here - new ElimStaticThis, new Flatten, + new ElimStaticThis, new RestoreScopes), List(/*new PrivateToStatic,*/ new ExpandPrivate, |