diff options
-rw-r--r-- | src/dotty/tools/dotc/core/Types.scala | 6 | ||||
-rw-r--r-- | test/dotc/tests.scala | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala index 3ad43a05e..114e6c908 100644 --- a/src/dotty/tools/dotc/core/Types.scala +++ b/src/dotty/tools/dotc/core/Types.scala @@ -1437,7 +1437,11 @@ object Types { asMemberOf(prefix) match { case NoDenotation => d.current case newd: SingleDenotation => newd - case newd => newd.atSignature(d.signature).checkUnique.orElse(d.current) + case newd => + newd.atSignature(d.signature) match { + case newd1: SingleDenotation if newd1.exists => newd1 + case _ => d.current + } } private def denotOfSym(sym: Symbol)(implicit ctx: Context): Denotation = { diff --git a/test/dotc/tests.scala b/test/dotc/tests.scala index 97c872bb6..de35d281b 100644 --- a/test/dotc/tests.scala +++ b/test/dotc/tests.scala @@ -157,6 +157,7 @@ class tests extends CompilerTest { @Test def dotc_ast = compileDir(dotcDir, "ast") @Test def dotc_config = compileDir(dotcDir, "config") @Test def dotc_core = compileDir(dotcDir, "core")("-Yno-double-bindings" :: allowDeepSubtypes)// twice omitted to make tests run faster + @Test def dotc_core_Types = compileFile(dotcDir, "core/Types")(noCheckOptions) // This directory doesn't exist anymore // @Test def dotc_core_pickling = compileDir(coreDir, "pickling")(allowDeepSubtypes)// twice omitted to make tests run faster |