Failed

org.eclipse.jdt.core.tests.compiler.regression.MethodVerifyTest.testBug536978_comment2 - 1.8 (from org.eclipse.jdt.core.tests.compiler.regression.TestAll)

Failing for the past 4 builds (Since Failed#130 )
Took 0.66 sec.

Error Message

testBug536978_comment2 - Eclipse found error(s) but Javac only found warning(s).
----------- Expected ------------
----------\n
1. ERROR in SimpleDemo.java (at line 22)\n
 protected SimpleResult test(AbstractResult request) {\n
           ^^^^^^^^^^^^\n
The return type is incompatible with AbstractDemo<Request,Response>.test(Request)\n
----------\n

------------ but was ------------
SimpleDemo.java:22: warning: [unchecked] test(AbstractResult) in SimpleDemo overrides test(Request) in AbstractDemo\n
    protected SimpleResult test(AbstractResult request) {\n
                           ^\n
  return type requires unchecked conversion from SimpleResult to Response#2\n
  where Request,Response#1,Response#2 are type-variables:\n
    Request extends AbstractResult declared in class AbstractDemo\n
    Response#1 extends AbstractResult declared in class AbstractDemo\n
    Response#2 extends AbstractResult declared in class SimpleDemo\n
1 warning\n

--------- Difference is ----------
 expected:<[----------\n
1. ERROR in SimpleDemo.java (at line 22)\n
 protected SimpleResult test(AbstractResult request) {\n
           ^^^^^^^^^^^^\n
The return type is incompatible with AbstractDemo<Request,Response>.test(Request)\n
----------]\n
> but was:<[SimpleDemo.java:22: warning: [unchecked] test(AbstractResult) in SimpleDemo overrides test(Request) in AbstractDemo\n
    protected SimpleResult test(AbstractResult request) {\n
                           ^\n
  return type requires unchecked conversion from SimpleResult to Response#2\n
  where Request,Response#1,Response#2 are type-variables:\n
    Request extends AbstractResult declared in class AbstractDemo\n
    Response#1 extends AbstractResult declared in class AbstractDemo\n
    Response#2 extends AbstractResult declared in class SimpleDemo\n
1 warning]\n
>

Stacktrace

junit.framework.ComparisonFailure: 
testBug536978_comment2 - Eclipse found error(s) but Javac only found warning(s).
----------- Expected ------------
----------\n
1. ERROR in SimpleDemo.java (at line 22)\n
	protected SimpleResult test(AbstractResult request) {\n
	          ^^^^^^^^^^^^\n
The return type is incompatible with AbstractDemo<Request,Response>.test(Request)\n
----------\n

------------ but was ------------
SimpleDemo.java:22: warning: [unchecked] test(AbstractResult) in SimpleDemo overrides test(Request) in AbstractDemo\n
    protected SimpleResult test(AbstractResult request) {\n
                           ^\n
  return type requires unchecked conversion from SimpleResult to Response#2\n
  where Request,Response#1,Response#2 are type-variables:\n
    Request extends AbstractResult declared in class AbstractDemo\n
    Response#1 extends AbstractResult declared in class AbstractDemo\n
    Response#2 extends AbstractResult declared in class SimpleDemo\n
1 warning\n

--------- Difference is ----------
 expected:<[----------\n
1. ERROR in SimpleDemo.java (at line 22)\n
	protected SimpleResult test(AbstractResult request) {\n
	          ^^^^^^^^^^^^\n
The return type is incompatible with AbstractDemo<Request,Response>.test(Request)\n
----------]\n
> but was:<[SimpleDemo.java:22: warning: [unchecked] test(AbstractResult) in SimpleDemo overrides test(Request) in AbstractDemo\n
    protected SimpleResult test(AbstractResult request) {\n
                           ^\n
  return type requires unchecked conversion from SimpleResult to Response#2\n
  where Request,Response#1,Response#2 are type-variables:\n
    Request extends AbstractResult declared in class AbstractDemo\n
    Response#1 extends AbstractResult declared in class AbstractDemo\n
    Response#2 extends AbstractResult declared in class SimpleDemo\n
1 warning]\n
>
	at org.eclipse.jdt.core.tests.compiler.regression.MethodVerifyTest.testBug536978_comment2(MethodVerifyTest.java:14394)

Standard Output

org.eclipse.jdt.core.tests.compiler.regression.MethodVerifyTest#testBug536978_comment2 - 1.8
SimpleDemo.java [
abstract interface AbstractResult {
	public abstract int test();
}

abstract class AbstractDemo<Request extends AbstractResult, Response extends AbstractResult> {
	protected abstract Response test(Request request);
}

interface SimpleResult extends AbstractResult {};

class Result1 implements SimpleResult {
    public int test() { return 1; }
}
class OtherResult implements AbstractResult {
    public int test() { return 2; }
}

public class SimpleDemo<Request extends AbstractResult, Response extends AbstractResult> 
extends AbstractDemo<Request, Response> {

    @Override
    protected SimpleResult test(AbstractResult request) {
        return new Result1();
    }
    
    public static void main(String... args) {
        AbstractDemo<OtherResult,OtherResult> demo = new SimpleDemo<OtherResult,OtherResult>();
        OtherResult result = demo.test(new OtherResult());
    }

}

]


Full results sent to /tmp/comptest/run.1575090299186/1.8.0_202_20191130_050502.txt

Standard Error

--- javac err: ---
SimpleDemo.java:22: warning: [unchecked] test(AbstractResult) in SimpleDemo overrides test(Request) in AbstractDemo
    protected SimpleResult test(AbstractResult request) {
                           ^
  return type requires unchecked conversion from SimpleResult to Response#2
  where Request,Response#1,Response#2 are type-variables:
    Request extends AbstractResult declared in class AbstractDemo
    Response#1 extends AbstractResult declared in class AbstractDemo
    Response#2 extends AbstractResult declared in class SimpleDemo
1 warning

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