Skip to content

Commit 7291e54

Browse files
committed
Add a simple test
1 parent a3bfa2e commit 7291e54

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import scala.annotation.experimental
2+
3+
@experimental def testFromNullable =
4+
val s: String | Null = "abc"
5+
val sopt1: Option[String] = Option(s) // error
6+
val sopt2: Option[String] = Option.fromNullable(s) // ok

0 commit comments

Comments
 (0)