Permalink
Browse files

SI-3943 Test case for already-fixed Java interop bug

Confirmed that this was fixed in edee27f.
  • Loading branch information...
1 parent b29a992 commit 0c7c521f89290380389f73d9f4441a314c9e02e9 @retronym retronym committed May 15, 2013
Showing with 21 additions and 0 deletions.
  1. +7 −0 test/files/pos/t3943/Client_2.scala
  2. +14 −0 test/files/pos/t3943/Outer_1.java
@@ -0,0 +1,7 @@
+object Test {
+ val x: Child = new Child
+ x.getInner.foo("meh")
+// error: type mismatch;
+// found : java.lang.String("meh")
+// required: E
+}
@@ -0,0 +1,14 @@
+class Outer<E> {
+ abstract class Inner {
+ abstract public void foo(E e);
+ }
+}
+
+class Child extends Outer<String> {
+ // the implicit prefix for Inner is Outer<E> instead of Outer<String>
+ public Inner getInner() {
+ return new Inner() {
+ public void foo(String e) { System.out.println("meh "+e); }
+ };
+ }
+}

0 comments on commit 0c7c521

Please sign in to comment.