diff options
-rw-r--r-- | src/dotty/tools/dotc/core/SymDenotations.scala | 3 | ||||
-rw-r--r-- | src/dotty/tools/dotc/core/Symbols.scala | 2 | ||||
-rw-r--r-- | tests/run/Course-2002-10.check (renamed from tests/pending/run/Course-2002-10.check) | 0 | ||||
-rw-r--r-- | tests/run/Course-2002-10.scala (renamed from tests/pending/run/Course-2002-10.scala) | 0 |
4 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 d2b0d5030..fb26b2540 100644 --- a/src/dotty/tools/dotc/core/SymDenotations.scala +++ b/src/dotty/tools/dotc/core/SymDenotations.scala @@ -40,7 +40,7 @@ trait SymDenotations { this: Context => } def stillValid(denot: SymDenotation): Boolean = - if (denot is ValidForever) true + if (denot.is(ValidForever) || denot.isRefinementClass) true else { val initial = denot.initial if (initial ne denot) @@ -49,6 +49,7 @@ trait SymDenotations { this: Context => val owner = denot.owner.denot stillValid(owner) && ( !owner.isClass + || owner.isRefinementClass || (owner.unforcedDecls.lookupAll(denot.name) contains denot.symbol) || denot.isSelfSym) } catch { diff --git a/src/dotty/tools/dotc/core/Symbols.scala b/src/dotty/tools/dotc/core/Symbols.scala index 0478b1b7b..602bdba80 100644 --- a/src/dotty/tools/dotc/core/Symbols.scala +++ b/src/dotty/tools/dotc/core/Symbols.scala @@ -408,7 +408,7 @@ object Symbols { /** Subclass tests and casts */ final def isTerm(implicit ctx: Context): Boolean = (if(isDefinedInCurrentRun) lastDenot else denot).isTerm - + final def isType(implicit ctx: Context): Boolean = (if(isDefinedInCurrentRun) lastDenot else denot).isType diff --git a/tests/pending/run/Course-2002-10.check b/tests/run/Course-2002-10.check index 207b671f0..207b671f0 100644 --- a/tests/pending/run/Course-2002-10.check +++ b/tests/run/Course-2002-10.check diff --git a/tests/pending/run/Course-2002-10.scala b/tests/run/Course-2002-10.scala index 4cfa1deb0..4cfa1deb0 100644 --- a/tests/pending/run/Course-2002-10.scala +++ b/tests/run/Course-2002-10.scala |