From 265ac7ac52a920bba0e7c101103d8cbe7d65d18c Mon Sep 17 00:00:00 2001 From: Dmitry Petrashko Date: Mon, 17 Nov 2014 17:31:15 +0100 Subject: Moving java tests to pos --- tests/pos/java-interop/t1254/t1254.java | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 tests/pos/java-interop/t1254/t1254.java (limited to 'tests/pos/java-interop/t1254/t1254.java') diff --git a/tests/pos/java-interop/t1254/t1254.java b/tests/pos/java-interop/t1254/t1254.java new file mode 100644 index 000000000..17e1c60bf --- /dev/null +++ b/tests/pos/java-interop/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.runtime.AbstractFunction0() { + 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