aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/SymDenotations.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-02-15 14:45:06 +0100
committerMartin Odersky <odersky@gmail.com>2016-02-17 18:39:36 +0100
commit4f1938809c94660984b59720232d4ef0e4048687 (patch)
tree664ea25840964448a25e8e8eeac04e112493c720 /src/dotty/tools/dotc/core/SymDenotations.scala
parent2f94c3d920ca87ebb98e7476150ad8b39f0b808f (diff)
downloaddotty-4f1938809c94660984b59720232d4ef0e4048687.tar.gz
dotty-4f1938809c94660984b59720232d4ef0e4048687.tar.bz2
dotty-4f1938809c94660984b59720232d4ef0e4048687.zip
Fix validity checking refinement
It seems some symbols are valid from NoPhase (0). In any case, we should not check members before typerphase.
Diffstat (limited to 'src/dotty/tools/dotc/core/SymDenotations.scala')
-rw-r--r--src/dotty/tools/dotc/core/SymDenotations.scala5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/core/SymDenotations.scala b/src/dotty/tools/dotc/core/SymDenotations.scala
index a7868bc08..0235c5048 100644
--- a/src/dotty/tools/dotc/core/SymDenotations.scala
+++ b/src/dotty/tools/dotc/core/SymDenotations.scala
@@ -45,8 +45,9 @@ trait SymDenotations { this: Context =>
if (denot.is(ValidForever) || denot.isRefinementClass) true
else {
val initial = denot.initial
- if ((initial ne denot) || ctx.phaseId != initial.validFor.firstPhaseId)
- ctx.withPhase(initial.validFor.firstPhaseId).stillValidInOwner(initial.asSymDenotation)
+ var firstPhaseId = initial.validFor.firstPhaseId.max(ctx.typerPhase.id)
+ if ((initial ne denot) || ctx.phaseId != firstPhaseId)
+ ctx.withPhase(firstPhaseId).stillValidInOwner(initial.asSymDenotation)
else
stillValidInOwner(denot)
}