summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/files/pos/t9239/Declaration.scala3
-rw-r--r--test/files/pos/t9239/Usage.java15
2 files changed, 18 insertions, 0 deletions
diff --git a/test/files/pos/t9239/Declaration.scala b/test/files/pos/t9239/Declaration.scala
new file mode 100644
index 0000000000..452dcc1e77
--- /dev/null
+++ b/test/files/pos/t9239/Declaration.scala
@@ -0,0 +1,3 @@
+class Foo[A]
+trait Bar[A] extends Foo[A]
+class Baz[A] extends Bar[A]
diff --git a/test/files/pos/t9239/Usage.java b/test/files/pos/t9239/Usage.java
new file mode 100644
index 0000000000..d1e3fb0c3e
--- /dev/null
+++ b/test/files/pos/t9239/Usage.java
@@ -0,0 +1,15 @@
+/**
+ * Used to fail with:
+ *
+ * Usage.java:5: error: incompatible types: Baz<String> cannot be converted to Foo<String>
+ * foo(f);
+ * ^
+ */
+public class Usage {
+ public Usage() {
+ Baz<String> f = null;
+ foo(f);
+ }
+
+ public void foo(Foo<String> f) { };
+}