You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (result =:=BooleanTpe) newExtractor(whole, Nil, NoRepeated)
79
+
else {
80
+
valgetResult= typeOfMemberNamedGet(result)
81
+
defnoGetError() = {
82
+
valname="unapply"+ (if (isSeq) "Seq"else"")
83
+
context.error(context.tree.pos, s"The result type of an $name method must contain a member `get` to be used as an extractor pattern, no such member exists in ${result}")
84
+
}
85
+
valexpanded= getResult match {
86
+
case global.NoType=> noGetError(); Nil
80
87
case rawGet if!hasSelectors(rawGet) => rawGet ::Nil
81
88
case rawGet => typesOfSelectors(rawGet)
82
89
}
83
-
)
84
-
expanded match {
85
-
caseinit :+ last if isSeq => newExtractor(whole, init, repeatedFromSeq(last))
86
-
case tps => newExtractor(whole, tps, NoRepeated)
90
+
expanded match {
91
+
case init :+ last if isSeq => newExtractor(whole, init, repeatedFromSeq(last), getResult)
if (requiresTupling && effectivePatternArity(args) ==1) {
146
-
valsym= sel.symbol.owner
147
-
currentRun.reporting.deprecationWarning(sel.pos, sym, s"${sym} expects $productArity patterns$acceptMessage but crushing into $productArity-tuple to fit single pattern (SI-6675)")
if (effectivePatternArity(args) ==1&& isTupleType(extractor.typeOfSinglePattern)) {
150
+
valsym= sel.symbol.owner
151
+
currentRun.reporting.deprecationWarning(sel.pos, sym, s"${sym} expects $productArity patterns$acceptMessage but crushing into $productArity-tuple to fit single pattern (SI-6675)")
0 commit comments