summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHubert Plociniczak <hubert.plociniczak@gmail.com>2012-06-26 11:19:17 +0200
committerHubert Plociniczak <hubert.plociniczak@gmail.com>2012-06-26 11:19:17 +0200
commitc9f29098c5e623894a6a2c2a9ddc1bb96add47b4 (patch)
tree946c4f7acaf516c7ef937b4174fbbd60207ea279
parent5a7bbfe035ecb64acd57fc66ea0d874ad02c31ff (diff)
downloadscala-c9f29098c5e623894a6a2c2a9ddc1bb96add47b4.tar.gz
scala-c9f29098c5e623894a6a2c2a9ddc1bb96add47b4.tar.bz2
scala-c9f29098c5e623894a6a2c2a9ddc1bb96add47b4.zip
Added test for SI-5761.
Seems that my cleanup of SI-4842 also fixed that one. Review by @paulp or @retronym.
-rw-r--r--test/files/neg/t5761.scala16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/files/neg/t5761.scala b/test/files/neg/t5761.scala
new file mode 100644
index 0000000000..040c4eb75a
--- /dev/null
+++ b/test/files/neg/t5761.scala
@@ -0,0 +1,16 @@
+class D[-A](x: A) { }
+
+object Test1 {
+ println(new D[Int]{}) // crash
+}
+
+object Test2 {
+ println(new D[Int]()) // no crash
+ println(new D[Int]{}) // crash
+}
+
+object Test3 {
+ new Tread("sth") { }.run()
+}
+
+