File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
compiler/src/dotty/tools/dotc/transform
tests/neg-custom-args/fatal-warnings Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -627,7 +627,7 @@ object CheckUnused:
627627
628628 extension (memDef : tpd.MemberDef )
629629 private def isValidMemberDef (using Context ): Boolean =
630- ! memDef.symbol.isUnusedAnnot && ! memDef.symbol.isAllOf(Flags .AccessorCreationFlags ) && ! memDef.name.isWildcard
630+ ! memDef.symbol.isUnusedAnnot && ! memDef.symbol.isAllOf(Flags .AccessorCreationFlags ) && ! memDef.name.isWildcard && ! memDef.symbol.owner.is( Extension )
631631
632632 private def isValidParam (using Context ): Boolean =
633633 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
1212
1313/* --- Trivial method check --- */
1414def 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