File tree 2 files changed +9
-2
lines changed
compiler/src/dotty/tools/dotc/transform
tests/neg-custom-args/fatal-warnings
2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -651,7 +651,7 @@ object CheckUnused:
651
651
652
652
extension (memDef : tpd.MemberDef )
653
653
private def isValidMemberDef (using Context ): Boolean =
654
- ! memDef.symbol.isUnusedAnnot && ! memDef.symbol.isAllOf(Flags .AccessorCreationFlags ) && ! memDef.name.isWildcard
654
+ ! memDef.symbol.isUnusedAnnot && ! memDef.symbol.isAllOf(Flags .AccessorCreationFlags ) && ! memDef.name.isWildcard && ! memDef.symbol.owner.is( Extension )
655
655
656
656
private def isValidParam (using Context ): Boolean =
657
657
val sym = memDef.symbol
Original file line number Diff line number Diff line change @@ -12,4 +12,11 @@ def f7(a: Int)(using Int) = summon[Int] + a // OK
12
12
13
13
/* --- Trivial method check --- */
14
14
def g1 (x : Int ) = 1 // OK
15
- def g2 (x : Int ) = ??? // OK
15
+ def g2 (x : Int ) = ??? // OK
16
+
17
+ package foo .test .i17101:
18
+ type Test [A ] = A
19
+ extension[A ] (x : Test [A ]) { // OK
20
+ def value : A = x
21
+ def causesIssue : Unit = println(" oh no" )
22
+ }
You can’t perform that action at this time.
0 commit comments