aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/t2331.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-05-07 19:09:52 +0200
committerSamuel Gruetter <samuel.gruetter@epfl.ch>2014-05-20 13:38:49 +0200
commit27081ae59ba5b00b6ae05bb3cdd9c3ff7db0a28e (patch)
treeab350b5ef2d7b9adc29fe715be2efb4681970127 /tests/pos/t2331.scala
parentfb3dba1bac13a755d2304928cbd49e7dde6f1bf9 (diff)
downloaddotty-27081ae59ba5b00b6ae05bb3cdd9c3ff7db0a28e.tar.gz
dotty-27081ae59ba5b00b6ae05bb3cdd9c3ff7db0a28e.tar.bz2
dotty-27081ae59ba5b00b6ae05bb3cdd9c3ff7db0a28e.zip
Tests pos/23xx to 24xx.
Diffstat (limited to 'tests/pos/t2331.scala')
-rw-r--r--tests/pos/t2331.scala11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/pos/t2331.scala b/tests/pos/t2331.scala
new file mode 100644
index 000000000..a7f80ac98
--- /dev/null
+++ b/tests/pos/t2331.scala
@@ -0,0 +1,11 @@
+trait C {
+ def m[T]: T
+}
+
+object Test {
+ val o /*: C --> no crash*/ = new C {
+ def m[T]: Nothing /*: T --> no crash*/ = sys.error("omitted")
+ }
+
+ o.m[Nothing]
+}