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 @@ -667,7 +667,7 @@ object CheckUnused:
667
667
668
668
extension (memDef : tpd.MemberDef )
669
669
private def isValidMemberDef (using Context ): Boolean =
670
- ! memDef.symbol.isUnusedAnnot && ! memDef.symbol.isAllOf(Flags .AccessorCreationFlags ) && ! memDef.name.isWildcard
670
+ ! memDef.symbol.isUnusedAnnot && ! memDef.symbol.isAllOf(Flags .AccessorCreationFlags ) && ! memDef.name.isWildcard && ! memDef.symbol.owner.is( Extension )
671
671
672
672
private def isValidParam (using Context ): Boolean =
673
673
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