diff options
author | Martin Odersky <odersky@gmail.com> | 2015-05-07 11:32:35 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-05-07 11:33:08 +0200 |
commit | 8f020bb6632d5d68e169f8caa7d9cbc1bc819d35 (patch) | |
tree | d849c43777a99fb6826057c207267b202daba228 /src/dotty/tools/dotc/core | |
parent | a52ca600f2ad427276d1cdabd56133ffd0ed7610 (diff) | |
download | dotty-8f020bb6632d5d68e169f8caa7d9cbc1bc819d35.tar.gz dotty-8f020bb6632d5d68e169f8caa7d9cbc1bc819d35.tar.bz2 dotty-8f020bb6632d5d68e169f8caa7d9cbc1bc819d35.zip |
Fix #536 - only load member classes of classes that are currently compiled.
It seems wasteful to load the member classes even of classes that are not currently compiled.
It also makes us vulnerable to any misinterpretation of Java file formats. In th particular
case of #536, we parsed a class an anonymous Collection$1 which was referring to the type
parameter of its enclosing class, but was not diagnosed as an inner class of the enclosing class.
Diffstat (limited to 'src/dotty/tools/dotc/core')
-rw-r--r-- | src/dotty/tools/dotc/core/Phases.scala | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/core/Phases.scala b/src/dotty/tools/dotc/core/Phases.scala index 406a3457a..e0496185e 100644 --- a/src/dotty/tools/dotc/core/Phases.scala +++ b/src/dotty/tools/dotc/core/Phases.scala @@ -235,6 +235,7 @@ object Phases { private val extensionMethodsCache = new PhaseCache(classOf[ExtensionMethods]) private val erasureCache = new PhaseCache(classOf[Erasure]) private val patmatCache = new PhaseCache(classOf[PatternMatcher]) + private val lambdaLiftCache = new PhaseCache(classOf[LambdaLift]) private val flattenCache = new PhaseCache(classOf[Flatten]) private val explicitOuterCache = new PhaseCache(classOf[ExplicitOuter]) private val gettersCache = new PhaseCache(classOf[Getters]) @@ -245,6 +246,7 @@ object Phases { def extensionMethodsPhase = extensionMethodsCache.phase def erasurePhase = erasureCache.phase def patmatPhase = patmatCache.phase + def lambdaLiftPhase = lambdaLiftCache.phase def flattenPhase = flattenCache.phase def explicitOuterPhase = explicitOuterCache.phase def gettersPhase = gettersCache.phase |