Skip to content

Failed

org.eclipse.jdt.core.tests.compiler.regression.LambdaExpressionsTest.test477263a - 1.8 (from org.eclipse.jdt.core.tests.compiler.regression.TestAll)

Failing for the past 4 builds (Since #6 )
Took 0.69 sec.

Error Message

test477263a - Javac found error(s) but Eclipse did not find any.
----------- Expected ------------

------------ but was ------------
X.java:19: error: incompatible types: invalid constructor reference\n
  I i = Y :: new;\n
        ^\n
    cannot access constructor Y(int)\n
      an enclosing instance of type X is not in scope\n
1 error\n

--------- Difference is ----------
 expected:<[]> but was:<[X.java:19: error: incompatible types: invalid constructor reference\n
  I i = Y :: new;\n
        ^\n
    cannot access constructor Y(int)\n
      an enclosing instance of type X is not in scope\n
1 error\n
]>

Stacktrace

junit.framework.ComparisonFailure: test477263a - Javac found error(s) but Eclipse did not find any.
----------- Expected ------------

------------ but was ------------
X.java:19: error: incompatible types: invalid constructor reference\n
		I i = Y :: new;\n
		      ^\n
    cannot access constructor Y(int)\n
      an enclosing instance of type X is not in scope\n
1 error\n

--------- Difference is ----------
 expected:<[]> but was:<[X.java:19: error: incompatible types: invalid constructor reference\n
		I i = Y :: new;\n
		      ^\n
    cannot access constructor Y(int)\n
      an enclosing instance of type X is not in scope\n
1 error\n
]>
	at org.eclipse.jdt.core.tests.junit.extension.TestCase.assertStringEquals(TestCase.java:260)
	at org.eclipse.jdt.core.tests.junit.extension.TestCase.assertEquals(TestCase.java:236)
	at org.eclipse.jdt.core.tests.compiler.regression.AbstractRegressionTest.runJavac(AbstractRegressionTest.java:2052)
	at org.eclipse.jdt.core.tests.compiler.regression.AbstractRegressionTest.runTest(AbstractRegressionTest.java:2814)
	at org.eclipse.jdt.core.tests.compiler.regression.AbstractRegressionTest.runTest(AbstractRegressionTest.java:2539)
	at org.eclipse.jdt.core.tests.compiler.regression.AbstractRegressionTest.runConformTest(AbstractRegressionTest.java:1396)
	at org.eclipse.jdt.core.tests.compiler.regression.AbstractRegressionTest.runConformTest(AbstractRegressionTest.java:1393)
	at org.eclipse.jdt.core.tests.compiler.regression.LambdaExpressionsTest.test477263a(LambdaExpressionsTest.java:5826)

Standard Output

org.eclipse.jdt.core.tests.compiler.regression.LambdaExpressionsTest#test477263a - 1.8
X.java [
interface I {
	X makeX(int x);
}
public class X {
	void foo() {
		int local = 10;
		class Y extends X {
			class Z extends X  {
				private Z(int z) {
				}
				private Z() {}
			}
			private Y(int y) {
				System.out.println(y);
			}
			 Y() {
			}
		}
		I i = Y :: new;
		i.makeX(local);
	}
	private X(int x) {
	}
	X() {
	}
	public static void main(String[] args) {
		new X().foo();
	}
}
]


Full results sent to /tmp/comptest/run.1514610271420/1.8.0_131_20171230_000432.txt

Standard Error

--- javac err: ---
X.java:19: error: incompatible types: invalid constructor reference
		I i = Y :: new;
		      ^
    cannot access constructor Y(int)
      an enclosing instance of type X is not in scope
1 error

----------------------------------------