Skip to content

Commit 82e5d96

Browse files
committed
Small optimization
1 parent 221b6c6 commit 82e5d96

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

compiler/src/dotty/tools/dotc/transform/Erasure.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -705,9 +705,9 @@ object Erasure {
705705
else
706706
val castTarget = // Avoid inaccessible cast targets, see i8661
707707
if sym.owner.isAccessibleFrom(qual1.tpe)(using preErasureCtx)
708-
then sym.owner
709-
else erasure(tree.qualifier.typeOpt.widen).classSymbol
710-
recur(cast(qual1, castTarget.typeRef))
708+
then sym.owner.typeRef
709+
else erasure(tree.qualifier.typeOpt.widen)
710+
recur(cast(qual1, castTarget))
711711
}
712712
}
713713

0 commit comments

Comments
 (0)