diff options
author | Martin Odersky <odersky@gmail.com> | 2016-10-08 10:41:09 +0200 |
---|---|---|
committer | Guillaume Martres <smarter@ubuntu.com> | 2016-10-12 03:36:57 +0200 |
commit | 695afc5651da0fae0ff2cf0467820b6503dd0f6d (patch) | |
tree | 2fa684544814c58451cfb1b7aa448bcab84b9ce7 /src/dotty/tools/dotc/core/SymDenotations.scala | |
parent | d64bab55aeaf9c182e0150e9a37cca3ed6ad635e (diff) | |
download | dotty-695afc5651da0fae0ff2cf0467820b6503dd0f6d.tar.gz dotty-695afc5651da0fae0ff2cf0467820b6503dd0f6d.tar.bz2 dotty-695afc5651da0fae0ff2cf0467820b6503dd0f6d.zip |
Don't let import symbols go stale
Otherwise we can run into problems when checking imports for e.g.
scala2Mode in later runs.
Diffstat (limited to 'src/dotty/tools/dotc/core/SymDenotations.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/SymDenotations.scala | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/SymDenotations.scala b/src/dotty/tools/dotc/core/SymDenotations.scala index 5a5eacd18..05501011a 100644 --- a/src/dotty/tools/dotc/core/SymDenotations.scala +++ b/src/dotty/tools/dotc/core/SymDenotations.scala @@ -41,7 +41,7 @@ trait SymDenotations { this: Context => } def stillValid(denot: SymDenotation): Boolean = - if (denot.is(ValidForever) || denot.isRefinementClass) true + if (denot.is(ValidForever) || denot.isRefinementClass || denot.isImport) true else { val initial = denot.initial val firstPhaseId = initial.validFor.firstPhaseId.max(ctx.typerPhase.id) @@ -590,6 +590,9 @@ object SymDenotations { originalName.isSetterName && (!isCompleted || info.firstParamTypes.nonEmpty) // to avoid being fooled by var x_= : Unit = ... + /** is this a symbol representing an import? */ + final def isImport = name == nme.IMPORT + /** is this the constructor of a class? */ final def isClassConstructor = name == nme.CONSTRUCTOR |