File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -582,7 +582,7 @@ object ProtoTypes {
582
582
override def isMatchedBy (tp : Type , keepConstraint : Boolean )(using Context ): Boolean =
583
583
canInstantiate(tp) || tp.member(nme.apply).hasAltWith(d => canInstantiate(d.info))
584
584
585
- def derivedPolyProto (targs : List [Tree ], resultType : Type ): PolyProto =
585
+ def derivedPolyProto (targs : List [Tree ], resType : Type ): PolyProto =
586
586
if ((targs eq this .targs) && (resType eq this .resType)) this
587
587
else PolyProto (targs, resType)
588
588
Original file line number Diff line number Diff line change
1
+ val l : List [Option [Int ]] = List (None , Some (1 ), None )
2
+
3
+ @ main def m15 =
4
+ l.collectFirst(Some .unapply.unlift[Option [Int ], Int ]) // error
You can’t perform that action at this time.
0 commit comments