diff --git a/tests/neg/i5810.scala b/tests/neg/i5810.scala new file mode 100644 index 000000000000..6d696a56ba54 --- /dev/null +++ b/tests/neg/i5810.scala @@ -0,0 +1,5 @@ +import language.strictEquality +def f[T](x: T) = + if (x == null) ??? // error: cannot be compared + else if (x == "abc") ??? // error: cannot be compared + else ??? \ No newline at end of file