Skip to content

Commit 7a4f257

Browse files
committed
Update tests about Regex
1 parent a4e9f5f commit 7a4f257

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tests/explicit-nulls/flexible-types-common/i7883.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import scala.util.matching.Regex
22

33
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)] =
55
s.trim match {
66
case r(hd, tl) => Some((hd, tl)) // error // error // error
77
case _ => None

tests/explicit-nulls/neg/i7883.check

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
8 | case r(hd, tl) => Some((hd, tl)) // error // error // error
33
| ^
44
| 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]]
66
| (c: Char): Option[List[Char]]
7-
| (s: CharSequence): Option[List[String]]
7+
| (s: CharSequence): Option[List[String | Null]]
88
| match arguments (String | Null)
99
-- [E006] Not Found Error: tests/explicit-nulls/neg/i7883.scala:8:30 ---------------------------------------------------
1010
8 | case r(hd, tl) => Some((hd, tl)) // error // error // error

0 commit comments

Comments
 (0)