Skip to content

Commit 91abbe6

Browse files
committed
Trial to use the "right" condition.
This seems to be the right condition for typing identifiers, but it failed tastyBootstrap on my machine. Let's see whether the CI agrees.
1 parent 4dbfa31 commit 91abbe6

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

compiler/src/dotty/tools/dotc/typer/Typer.scala

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -270,13 +270,9 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
270270
if (isSelfDenot(defDenot)) curOwner.enclosingClass.thisType
271271
else {
272272
val effectiveOwner =
273-
if (curOwner.isTerm && defDenot.symbol.isType)
273+
if (curOwner.isTerm && defDenot.symbol.maybeOwner.isClass)
274274
// Don't mix NoPrefix and thisType prefixes, since type comparer
275-
// would not detect types to be compatible. Note: If we replace the
276-
// 2nd condition by `defDenot.symbol.maybeOwner.isType` we get lots
277-
// of failures in the `tastyBootstrap` test. Trying to compile these
278-
// files in isolation works though.
279-
// TODO: Investigate why that happens.
275+
// would not detect types to be compatible.
280276
defDenot.symbol.owner
281277
else
282278
curOwner

0 commit comments

Comments
 (0)