aboutsummaryrefslogtreecommitdiff
path: root/tests/run/t1718.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run/t1718.scala')
-rw-r--r--tests/run/t1718.scala10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/run/t1718.scala b/tests/run/t1718.scala
new file mode 100644
index 000000000..e6f520254
--- /dev/null
+++ b/tests/run/t1718.scala
@@ -0,0 +1,10 @@
+object Test extends dotty.runtime.LegacyApp{
+ def matchesNull[T](mightBeNull: Array[T]): Boolean = mightBeNull match {
+ case null => true
+ case x => false
+ }
+
+ val nullArray: Array[String] = null
+ println(matchesNull(nullArray))
+}
+