We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents bb806c5 + 8aa7c96 commit 6d0817dCopy full SHA for 6d0817d
tests/pos/i12180a.scala
@@ -0,0 +1,7 @@
1
+inline def n = null
2
+inline def f = inline if n == null then 0 else 1
3
+inline def m = inline n match { case null => 0; case _ => 1 }
4
+
5
+@main def main =
6
+ println(f) // error
7
+ println(m)
tests/pos/i12180b.scala
@@ -0,0 +1,9 @@
+inline def n = "im a string"
+inline def g = inline if null == n then 0 else 1
+ println(f)
8
+ println(g)
9
0 commit comments