From 8087f9b529ad79a403a29117408632366a7534d9 Mon Sep 17 00:00:00 2001 From: Iulian Dragos Date: Mon, 30 Mar 2009 12:26:51 +0000 Subject: Fixed Java signatures of forwarders for inherit... Fixed Java signatures of forwarders for inherited members, and references to scala.Nothing are translated to scala.runtime.Nothing$ (see #1254, #1822, #1555). Moved a Java test that was not run to its proper subdirectory, to make partest happy. --- test/files/pos5/t1186.java | 8 -------- test/files/pos5/t1186/t1186.java | 8 ++++++++ test/files/pos5/t1254/t1254.java | 28 ++++++++++++++++++++++++++++ 3 files changed, 36 insertions(+), 8 deletions(-) delete mode 100644 test/files/pos5/t1186.java create mode 100644 test/files/pos5/t1186/t1186.java create mode 100644 test/files/pos5/t1254/t1254.java (limited to 'test') diff --git a/test/files/pos5/t1186.java b/test/files/pos5/t1186.java deleted file mode 100644 index c1bfcecab8..0000000000 --- a/test/files/pos5/t1186.java +++ /dev/null @@ -1,8 +0,0 @@ -import scala.collection.immutable.Map; - -class Test { - - void foo() { - Map map = null; - } -} \ No newline at end of file diff --git a/test/files/pos5/t1186/t1186.java b/test/files/pos5/t1186/t1186.java new file mode 100644 index 0000000000..c1bfcecab8 --- /dev/null +++ b/test/files/pos5/t1186/t1186.java @@ -0,0 +1,8 @@ +import scala.collection.immutable.Map; + +class Test { + + void foo() { + Map map = null; + } +} \ No newline at end of file diff --git a/test/files/pos5/t1254/t1254.java b/test/files/pos5/t1254/t1254.java new file mode 100644 index 0000000000..25b733cf28 --- /dev/null +++ b/test/files/pos5/t1254/t1254.java @@ -0,0 +1,28 @@ +/* Taken from ticket #1254. Tests Java signatures in mirror classes and that + Nothing is translated to Nothing$. +*/ + +import scala.None; + +// This compiles with javac but fails with Eclipse java compiler: +// 'The type scala.Nothing cannot be resolved. It is indirectly referenced from required .class files' +class NothingBug3 { + public NothingBug3() { + scala.Option o = scala.None$.MODULE$; + + test(o); + None.toLeft(new scala.Function0() { + public Integer apply() { return 0; } + }); + } + + public void test(scala.Option f) {} +} + +// This compiles with javac but fails with Eclipse java compiler: +// 'The type scala.Nothing cannot be resolved. It is indirectly referenced from required .class files' +class NothingBug4 { + public NothingBug4() { + scala.Option o = scala.None$.MODULE$; + } +} -- cgit v1.2.3