summaryrefslogtreecommitdiff
path: root/test/files/pos/t2331.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/pos/t2331.scala')
-rw-r--r--test/files/pos/t2331.scala11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/files/pos/t2331.scala b/test/files/pos/t2331.scala
new file mode 100644
index 0000000000..9a15b5c2a9
--- /dev/null
+++ b/test/files/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*/ = error("omitted")
+ }
+
+ o.m[Nothing]
+} \ No newline at end of file