Skip to content

Failed

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

Failing for the past 1 build (Since #9 )
Took 0.76 sec.

Error Message

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

------------ but was ------------
X.java:12: error: incompatible types: invalid constructor reference\n
     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:12: error: incompatible types: invalid constructor reference\n
     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: test044 - Javac found error(s) but Eclipse did not find any.
----------- Expected ------------

------------ but was ------------
X.java:12: error: incompatible types: invalid constructor reference\n
					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:12: error: incompatible types: invalid constructor reference\n
					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.test044(LambdaExpressionsTest.java:1167)

Standard Output

org.eclipse.jdt.core.tests.compiler.regression.LambdaExpressionsTest#test044 - 1.8
X.java [
interface I {
	X makeX(int x);
}
public class X {
	void foo() {
		int local;
		class Y extends X {
			class Z extends X {
				void f() {
					I i = X::new;
					i.makeX(123456);
					i = Y::new;
					i.makeX(987654);
					i = Z::new;
					i.makeX(456789);
				}
				private Z(int z) {
					System.out.println("Z(" + z + ")");
				}
				Z() {}
			}
			private Y(int y) {
				System.out.println("Y(" + y + ")");
			}
			private Y() {
			}
		}
		new Y().new Z().f();
	}
	private X(int x) {
		System.out.println("X(" + 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:12: error: incompatible types: invalid constructor reference
					i = Y::new;
					    ^
    cannot access constructor Y(int)
      an enclosing instance of type X is not in scope
1 error

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