Skip to content

Commit 12f75a9

Browse files
committed
Import given takes NoPrefix usage
1 parent db2aec1 commit 12f75a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ object CheckUnused:
625625
if selector.isGiven then // Further check that the symbol is a given or implicit and conforms to the bound
626626
sym.isOneOf(Given | Implicit)
627627
&& (selector.bound.isEmpty || sym.info.finalResultType <:< selector.boundTpe)
628-
&& selData.qualTpe =:= prefix
628+
&& (prefix.eq(NoPrefix) || selData.qualTpe =:= prefix)
629629
else
630630
!sym.is(Given) // Normal wildcard, check that the symbol is not a given (but can be implicit)
631631
}

0 commit comments

Comments
 (0)