diff options
author | Paul Phillips <paulp@improving.org> | 2012-09-11 10:00:14 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-09-12 20:47:39 -0700 |
commit | 1806830ec802feea0b89f1a71e0dc15c1507b965 (patch) | |
tree | 1dc0e3045ec0639f97e20b377f0c68ef1fdd5f0f | |
parent | 7a44282d130937e0f6f6c8d19bea08f466a0d2e9 (diff) | |
download | scala-1806830ec802feea0b89f1a71e0dc15c1507b965.tar.gz scala-1806830ec802feea0b89f1a71e0dc15c1507b965.tar.bz2 scala-1806830ec802feea0b89f1a71e0dc15c1507b965.zip |
Pending test for SI-3943
-rw-r--r-- | test/pending/pos/t3943/Outer_1.java | 14 | ||||
-rw-r--r-- | test/pending/pos/t3943/test_2.scala | 8 |
2 files changed, 22 insertions, 0 deletions
diff --git a/test/pending/pos/t3943/Outer_1.java b/test/pending/pos/t3943/Outer_1.java new file mode 100644 index 0000000000..56c8cc7f85 --- /dev/null +++ b/test/pending/pos/t3943/Outer_1.java @@ -0,0 +1,14 @@ +public class Outer_1<E> { + abstract class Inner { + abstract public void foo(E e); + } +} + +class Child extends Outer_1<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); } + }; + } +} diff --git a/test/pending/pos/t3943/test_2.scala b/test/pending/pos/t3943/test_2.scala new file mode 100644 index 0000000000..a19db8b226 --- /dev/null +++ b/test/pending/pos/t3943/test_2.scala @@ -0,0 +1,8 @@ +object Test extends App { + val x: Child = new Child + x.getInner.foo("meh") +// ^ +// error: type mismatch; +// found : java.lang.String("meh") +// required: E +} |