File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 1
1
import scala .util .matching .Regex
2
2
3
3
object Test extends App {
4
- def head (s : String , r : Regex ): Option [(String , String )] =
4
+ def head (s : String , r : Regex ): Option [(String | Null , String | Null )] =
5
5
s.trim match {
6
6
case r(hd, tl) => Some ((hd, tl)) // error // error // error
7
7
case _ => None
Original file line number Diff line number Diff line change 2
2
8 | case r(hd, tl) => Some((hd, tl)) // error // error // error
3
3
| ^
4
4
| None of the overloaded alternatives of method unapplySeq in class Regex with types
5
- | (m: scala.util.matching.Regex.Match): Option[List[String]]
5
+ | (m: scala.util.matching.Regex.Match): Option[List[String | Null ]]
6
6
| (c: Char): Option[List[Char]]
7
- | (s: CharSequence): Option[List[String]]
7
+ | (s: CharSequence): Option[List[String | Null ]]
8
8
| match arguments (String | Null)
9
9
-- [E006] Not Found Error: tests/explicit-nulls/neg/i7883.scala:8:30 ---------------------------------------------------
10
10
8 | case r(hd, tl) => Some((hd, tl)) // error // error // error
You can’t perform that action at this time.
0 commit comments