diff options
author | Martin Odersky <odersky@gmail.com> | 2016-02-15 14:45:06 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-02-17 18:39:36 +0100 |
commit | 4f1938809c94660984b59720232d4ef0e4048687 (patch) | |
tree | 664ea25840964448a25e8e8eeac04e112493c720 /src/dotty/tools/dotc/core/SymDenotations.scala | |
parent | 2f94c3d920ca87ebb98e7476150ad8b39f0b808f (diff) | |
download | dotty-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.scala | 5 |
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) } |