diff options
Diffstat (limited to 'tests/disabled/java-interop/failing')
14 files changed, 67 insertions, 21 deletions
diff --git a/tests/disabled/java-interop/failing/t1459/AbstractBase.java b/tests/disabled/java-interop/failing/t1459/AbstractBase.java new file mode 100755 index 000000000..492419416 --- /dev/null +++ b/tests/disabled/java-interop/failing/t1459/AbstractBase.java @@ -0,0 +1,5 @@ +package base; + +public abstract class AbstractBase { + public abstract void doStuff(String... params); // !!! was Object.. +}
\ No newline at end of file diff --git a/tests/disabled/java-interop/failing/t1459/App.scala b/tests/disabled/java-interop/failing/t1459/App.scala new file mode 100755 index 000000000..36e5022e9 --- /dev/null +++ b/tests/disabled/java-interop/failing/t1459/App.scala @@ -0,0 +1,18 @@ +package foo +import base._ + +object App extends scala.App { + class Concrete extends AbstractBase { + override def doStuff(params:java.lang.String*): Unit = println("doStuff invoked") + } + + val impl = new Concrete + + //succeeds + impl.doStuff(null) + + val caller = new Caller + + // fails with AbstractMethodError + caller.callDoStuff(impl) +} diff --git a/tests/disabled/java-interop/failing/t1459/Caller.java b/tests/disabled/java-interop/failing/t1459/Caller.java new file mode 100755 index 000000000..4ae51d8c5 --- /dev/null +++ b/tests/disabled/java-interop/failing/t1459/Caller.java @@ -0,0 +1,7 @@ +package base; + +public class Caller { + public void callDoStuff(AbstractBase impl) { + impl.doStuff("abc"); // was new Object()); + } +}
\ No newline at end of file diff --git a/tests/disabled/java-interop/failing/t1751/A1_2.scala b/tests/disabled/java-interop/failing/t1751/A1_2.scala deleted file mode 100644 index 354d5eecd..000000000 --- a/tests/disabled/java-interop/failing/t1751/A1_2.scala +++ /dev/null @@ -1,2 +0,0 @@ -@SuiteClasses(Array(classOf[A2])) -class A1 diff --git a/tests/disabled/java-interop/failing/t1751/A2_1.scala b/tests/disabled/java-interop/failing/t1751/A2_1.scala deleted file mode 100644 index c768062e4..000000000 --- a/tests/disabled/java-interop/failing/t1751/A2_1.scala +++ /dev/null @@ -1,2 +0,0 @@ -@SuiteClasses(Array()) -class A2 diff --git a/tests/disabled/java-interop/failing/t1751/SuiteClasses.java b/tests/disabled/java-interop/failing/t1751/SuiteClasses.java deleted file mode 100644 index a415e4f57..000000000 --- a/tests/disabled/java-interop/failing/t1751/SuiteClasses.java +++ /dev/null @@ -1,3 +0,0 @@ -public @interface SuiteClasses { - public Class<?>[] value(); -} diff --git a/tests/disabled/java-interop/failing/t2569/Child.scala b/tests/disabled/java-interop/failing/t2569/Child.scala new file mode 100644 index 000000000..64f4dc172 --- /dev/null +++ b/tests/disabled/java-interop/failing/t2569/Child.scala @@ -0,0 +1,9 @@ +package varargs + + class Child extends Parent { + + override def concatenate(strings: String*): String = + strings map("\"" + _ + "\"") mkString("(", ", ", ")") + + } + diff --git a/tests/disabled/java-interop/failing/t2569/Parent.java b/tests/disabled/java-interop/failing/t2569/Parent.java new file mode 100644 index 000000000..89421becb --- /dev/null +++ b/tests/disabled/java-interop/failing/t2569/Parent.java @@ -0,0 +1,13 @@ +package varargs; + + public class Parent { + + public String concatenate(String... strings) { + StringBuilder builder = new StringBuilder(); + for (String s : strings) { + builder.append(s); + } + return builder.toString(); + } + + } diff --git a/tests/disabled/java-interop/failing/t294/Ann.java b/tests/disabled/java-interop/failing/t294/Ann.java deleted file mode 100644 index 934ca4629..000000000 --- a/tests/disabled/java-interop/failing/t294/Ann.java +++ /dev/null @@ -1,3 +0,0 @@ -public @interface Ann { - public Ann2[] nested(); -} diff --git a/tests/disabled/java-interop/failing/t294/Ann2.java b/tests/disabled/java-interop/failing/t294/Ann2.java deleted file mode 100644 index 025b79e79..000000000 --- a/tests/disabled/java-interop/failing/t294/Ann2.java +++ /dev/null @@ -1,3 +0,0 @@ -public @interface Ann2 { - public int value(); -} diff --git a/tests/disabled/java-interop/failing/t294/Test_1.scala b/tests/disabled/java-interop/failing/t294/Test_1.scala deleted file mode 100644 index ff1f34b10..000000000 --- a/tests/disabled/java-interop/failing/t294/Test_1.scala +++ /dev/null @@ -1,7 +0,0 @@ -// also test pickling of java annotations; Test_2.scala will -// read this class file -@Ann(nested = Array(new Ann2(10))) class Test { - @Ann2(100) var ctx: Object = _ - @Ann(nested = Array()) def foo = 10 - @Ann(nested = Array(new Ann2(10), new Ann2(23))) val bam = -3 -} diff --git a/tests/disabled/java-interop/failing/t294/Test_2.scala b/tests/disabled/java-interop/failing/t294/Test_2.scala deleted file mode 100644 index 9fb1c6e17..000000000 --- a/tests/disabled/java-interop/failing/t294/Test_2.scala +++ /dev/null @@ -1 +0,0 @@ -class Test2 extends Test diff --git a/tests/disabled/java-interop/failing/varargs-bridge/A.java b/tests/disabled/java-interop/failing/varargs-bridge/A.java new file mode 100644 index 000000000..3cd92864b --- /dev/null +++ b/tests/disabled/java-interop/failing/varargs-bridge/A.java @@ -0,0 +1,8 @@ +package test; +public class A { + + int foo(int... x) { + return x.length; + } + +}
\ No newline at end of file diff --git a/tests/disabled/java-interop/failing/varargs-bridge/B.scala b/tests/disabled/java-interop/failing/varargs-bridge/B.scala new file mode 100644 index 000000000..efd81b0bf --- /dev/null +++ b/tests/disabled/java-interop/failing/varargs-bridge/B.scala @@ -0,0 +1,7 @@ +package test +class B extends A { + override def foo(x: Int*): Int = x.length + 1 +} +object B extends App { + println(new B().foo(1, 2, 3)) +} |