@@ -188,9 +188,9 @@ class Regex private[matching](val pattern: Pattern, groupNames: String*) extends
188
188
* @param s The string to match
189
189
* @return The matches
190
190
*/
191
- def unapplySeq (s : CharSequence ): Option [Seq [String ]] = {
191
+ def unapplySeq (s : CharSequence ): Option [List [String ]] = {
192
192
val m = pattern matcher s
193
- if (runMatcher(m)) Some (1 to m.groupCount map m.group)
193
+ if (runMatcher(m)) Some (( 1 to m.groupCount).toList map m.group)
194
194
else None
195
195
}
196
196
@@ -225,10 +225,10 @@ class Regex private[matching](val pattern: Pattern, groupNames: String*) extends
225
225
* @param c The Char to match
226
226
* @return The match
227
227
*/
228
- def unapplySeq (c : Char ): Option [Seq [Char ]] = {
228
+ def unapplySeq (c : Char ): Option [List [Char ]] = {
229
229
val m = pattern matcher c.toString
230
230
if (runMatcher(m)) {
231
- if (m.groupCount > 0 ) Some (m group 1 ) else Some (Nil )
231
+ if (m.groupCount > 0 ) Some (( m group 1 ).toList ) else Some (Nil )
232
232
} else None
233
233
}
234
234
@@ -238,9 +238,9 @@ class Regex private[matching](val pattern: Pattern, groupNames: String*) extends
238
238
* Otherwise, this Regex is applied to the previously matched input,
239
239
* and the result of that match is used.
240
240
*/
241
- def unapplySeq (m : Match ): Option [Seq [String ]] =
241
+ def unapplySeq (m : Match ): Option [List [String ]] =
242
242
if (m.matched == null ) None
243
- else if (m.matcher.pattern == this .pattern) Some (1 to m.groupCount map m.group)
243
+ else if (m.matcher.pattern == this .pattern) Some (( 1 to m.groupCount).toList map m.group)
244
244
else unapplySeq(m.matched)
245
245
246
246
/** Tries to match target.
0 commit comments