View | Details | Raw Unified | Return to bug 94759 | Differences between
and this patch

Collapse All | Expand All

(-)AnnotationTest.java (-1 / +26 lines)
Lines 3892-3898 Link Here
3892
                "X.java",
3892
                "X.java",
3893
				"public interface X {\n" + 
3893
				"public interface X {\n" + 
3894
				"   Zork z;\n" +
3894
				"   Zork z;\n" +
3895
				"	@Override\n" + 
3896
				"   X clone();\n" + 
3895
				"   X clone();\n" + 
3897
				"}\n",
3896
				"}\n",
3898
            },
3897
            },
Lines 5393-5396 Link Here
5393
		"Return type for the method is missing\n" + 
5392
		"Return type for the method is missing\n" + 
5394
		"----------\n");
5393
		"----------\n");
5395
    }
5394
    }
5395
    //https://bugs.eclipse.org/bugs/show_bug.cgi?id=94759
5396
    public void test168() {
5397
        this.runNegativeTest(
5398
            new String[] {
5399
                "X.java",
5400
				"interface I {\n" + 
5401
				"	@Override I clone();\n" + 
5402
				"	void foo();\n" + 
5403
				"}\n" + 
5404
				"\n" + 
5405
				"interface J extends I {\n" + 
5406
				"	@Override void foo();\n" + 
5407
				"}\n",
5408
           },
5409
		"----------\n" + 
5410
		"1. ERROR in X.java (at line 2)\n" + 
5411
		"	@Override I clone();\n" + 
5412
		"	            ^^^^^^^\n" + 
5413
		"The method clone() of type I must override a superclass method\n" + 
5414
		"----------\n" + 
5415
		"2. ERROR in X.java (at line 7)\n" + 
5416
		"	@Override void foo();\n" + 
5417
		"	               ^^^^^\n" + 
5418
		"The method foo() of type J must override a superclass method\n" + 
5419
		"----------\n");
5420
    }    
5396
}
5421
}

Return to bug 94759