aboutsummaryrefslogtreecommitdiff
path: root/tests/untried/neg/t1872.check
diff options
context:
space:
mode:
Diffstat (limited to 'tests/untried/neg/t1872.check')
-rw-r--r--tests/untried/neg/t1872.check8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/untried/neg/t1872.check b/tests/untried/neg/t1872.check
new file mode 100644
index 000000000..c5dc2a808
--- /dev/null
+++ b/tests/untried/neg/t1872.check
@@ -0,0 +1,8 @@
+t1872.scala:3: warning: fruitless type test: a value of type Int cannot also be a scala.util.Random
+ def f(x: Int) = x.isInstanceOf[util.Random]
+ ^
+t1872.scala:3: error: isInstanceOf cannot test if value types are references.
+ def f(x: Int) = x.isInstanceOf[util.Random]
+ ^
+one warning found
+one error found