Skip to content

Commit 2b5dfbd

Browse files
committed
Partial revert asSeenFrom
It caused a pattern match exhaustivity test to fail. Now reducing to the narrowest condition to make opaque aliases work.
1 parent c3071b2 commit 2b5dfbd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/core/TypeOps.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ trait TypeOps { this: Context => // TODO: Make standalone object.
5353
tp match {
5454
case tp: NamedType =>
5555
val sym = tp.symbol
56-
if (sym.isStaticOwner || (tp.prefix `eq` NoPrefix)) tp
56+
if (sym.isStatic && !sym.maybeOwner.isOpaqueCompanion || (tp.prefix `eq` NoPrefix)) tp
5757
else derivedSelect(tp, atVariance(variance max 0)(this(tp.prefix)))
5858
case tp: ThisType =>
5959
toPrefix(pre, cls, tp.cls)

0 commit comments

Comments
 (0)