aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/dotty/tools/dotc/typer/Typer.scala2
-rw-r--r--tests/pos/t1280.scala (renamed from tests/pending/pos/t1280.scala)0
2 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala
index 4fdee86a3..7c301a7f1 100644
--- a/src/dotty/tools/dotc/typer/Typer.scala
+++ b/src/dotty/tools/dotc/typer/Typer.scala
@@ -209,7 +209,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
if (qualifies(defDenot)) {
val curOwner = ctx.owner
val found =
- if (isSelfDenot(defDenot)) curOwner.thisType
+ if (isSelfDenot(defDenot)) curOwner.enclosingClass.thisType
else curOwner.thisType.select(name, defDenot)
if (!(curOwner is Package) || (defDenot.symbol is Package) || isDefinedInCurrentUnit(defDenot))
return checkNewOrShadowed(found, definition) // no need to go further out, we found highest prec entry
diff --git a/tests/pending/pos/t1280.scala b/tests/pos/t1280.scala
index 39406b2e3..39406b2e3 100644
--- a/tests/pending/pos/t1280.scala
+++ b/tests/pos/t1280.scala