File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -947,8 +947,11 @@ object Types {
947947 final def possibleSamMethods (using Context ): Seq [SingleDenotation ] = {
948948 record(" possibleSamMethods" )
949949 atPhaseNoLater(erasurePhase) {
950- abstractTermMembers.toList.filterConserve(m =>
951- ! m.symbol.matchingMember(defn.ObjectType ).exists && ! m.symbol.isSuperAccessor)
950+ abstractTermMembers.toList.filterConserve { m =>
951+ ! m.symbol.matchingMember(defn.ObjectType ).exists
952+ && ! m.symbol.isSuperAccessor
953+ && ! m.symbol.isInlineMethod
954+ }
952955 }.map(_.current)
953956 }
954957
@@ -5353,6 +5356,7 @@ object Types {
53535356 *
53545357 * - has a single abstract method with a method type (ExprType
53555358 * and PolyType not allowed!) whose result type is not an implicit function type
5359+ * and which is not marked inline.
53565360 * - can be instantiated without arguments or with just () as argument.
53575361 *
53585362 * The pattern `SAMType(sam)` matches a SAM type, where `sam` is the
Original file line number Diff line number Diff line change @@ -10,9 +10,9 @@ import Noop.*
1010
1111final case class User (name : String , age : Int )
1212
13- inline given Noop [User ] = a => a
13+ inline given Noop [User ] = a => a // error
1414
1515val u = User (" hello" , 45 )
1616
1717@ main
18- def run = println(Noop .noop(u)) // error
18+ def run = println(Noop .noop(u))
You can’t perform that action at this time.
0 commit comments