We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c3071b2 commit 2b5dfbdCopy full SHA for 2b5dfbd
compiler/src/dotty/tools/dotc/core/TypeOps.scala
@@ -53,7 +53,7 @@ trait TypeOps { this: Context => // TODO: Make standalone object.
53
tp match {
54
case tp: NamedType =>
55
val sym = tp.symbol
56
- if (sym.isStaticOwner || (tp.prefix `eq` NoPrefix)) tp
+ if (sym.isStatic && !sym.maybeOwner.isOpaqueCompanion || (tp.prefix `eq` NoPrefix)) tp
57
else derivedSelect(tp, atVariance(variance max 0)(this(tp.prefix)))
58
case tp: ThisType =>
59
toPrefix(pre, cls, tp.cls)
0 commit comments