diff options
author | Iulian Dragos <jaguarul@gmail.com> | 2009-03-30 12:26:51 +0000 |
---|---|---|
committer | Iulian Dragos <jaguarul@gmail.com> | 2009-03-30 12:26:51 +0000 |
commit | 8087f9b529ad79a403a29117408632366a7534d9 (patch) | |
tree | 8b4433279a2352ad4ff4914856a709a418ea7fee /test/files/pos5 | |
parent | b62a73e023b4dad90f1712c448fdf9f456b8ebcf (diff) | |
download | scala-8087f9b529ad79a403a29117408632366a7534d9.tar.gz scala-8087f9b529ad79a403a29117408632366a7534d9.tar.bz2 scala-8087f9b529ad79a403a29117408632366a7534d9.zip |
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.
Diffstat (limited to 'test/files/pos5')
-rw-r--r-- | test/files/pos5/t1186/t1186.java (renamed from test/files/pos5/t1186.java) | 0 | ||||
-rw-r--r-- | test/files/pos5/t1254/t1254.java | 28 |
2 files changed, 28 insertions, 0 deletions
diff --git a/test/files/pos5/t1186.java b/test/files/pos5/t1186/t1186.java index c1bfcecab8..c1bfcecab8 100644 --- a/test/files/pos5/t1186.java +++ b/test/files/pos5/t1186/t1186.java 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<Integer>() { + public Integer apply() { return 0; } + }); + } + + public <T>void test(scala.Option<T> 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$; + } +} |