Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 198572 Details for
Bug 350318
[compiler] Erroneous name clash error in @Override methods
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Unit test & fix under test
Bug_350318_v1.patch (text/plain), 4.38 KB, created by
Stephan Herrmann
on 2011-06-24 16:17:50 EDT
(
hide
)
Description:
Unit test & fix under test
Filename:
MIME Type:
Creator:
Stephan Herrmann
Created:
2011-06-24 16:17:50 EDT
Size:
4.38 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/RoleTypeCreator.java >=================================================================== >--- compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/RoleTypeCreator.java (revision 1463) >+++ compiler/org/eclipse/objectteams/otdt/internal/core/compiler/util/RoleTypeCreator.java (working copy) >@@ -100,6 +100,8 @@ > && arg instanceof ReferenceBinding > && !arg.isTypeVariable()) > arguments[i] = updateArg((ReferenceBinding)arg); >+ else >+ arguments[i] = arg; > > // must avoid nulls in arguments: > if (arguments[i] == null) { >#P org.eclipse.objectteams.otdt.tests >Index: otjld/org/eclipse/objectteams/otdt/tests/otjld/regression/ReportedBugs.java >=================================================================== >--- otjld/org/eclipse/objectteams/otdt/tests/otjld/regression/ReportedBugs.java (revision 1440) >+++ otjld/org/eclipse/objectteams/otdt/tests/otjld/regression/ReportedBugs.java (working copy) >@@ -38,7 +38,7 @@ > // Static initializer to specify tests subset using TESTS_* static variables > // All specified tests which does not belong to the class are skipped... > static { >-// TESTS_NAMES = new String[] { "testB11_sh62"}; >+ TESTS_NAMES = new String[] { "testB11_sh95"}; > // TESTS_NUMBERS = new int[] { 1459 }; > // TESTS_RANGE = new int[] { 1097, -1 }; > } >@@ -4252,6 +4252,87 @@ > "----------\n"); > } > >+ // Bug 350318 - [compiler] Erroneous name clash error in @Override methods >+ // originally reported by André Lehmann >+ public void testB11_sh95() { >+ compileOrder = new String[][] { {"Visitor.java"}, {"Caller.java"}}; >+ Map options = getCompilerOptions(); >+ options.put(CompilerOptions.OPTION_ReportMissingOverrideAnnotationForInterfaceMethodImplementation, CompilerOptions.DISABLED); >+ runTestExpectingWarnings( >+ new String[] { >+ "Caller.java", >+ "\n" + >+ "public class Caller {\n" + >+ " private static class VisitorImpl extends VisitorAdapter<Object> {\n" + >+ " \n" + >+ " @Override\n" + >+ " public Parameter1 visit(Long r, Object a) {\n" + >+ " return null;\n" + >+ " }\n" + >+ " \n" + >+ " @Override\n" + >+ " public Parameter1 visit(Integer r, Object a) {\n" + >+ " return null;\n" + >+ " }\n" + >+ " \n" + >+ " @Override\n" + >+ " public Parameter1 visit(Number r, Object a) {\n" + >+ " return null;\n" + >+ " }\n" + >+ " }\n" + >+ "\n" + >+ " private void accept(Visitor<Parameter1, Parameter2> v) {\n" + >+ " v.visit(1, new Parameter2());\n" + >+ " }\n" + >+ " \n" + >+ " public void start() {\n" + >+ " }\n" + >+ "}\n", >+ "Visitor.java", >+ "public interface Visitor<R, A> {\n" + >+ "\n" + >+ " R visit(Long r, A a);\n" + >+ "\n" + >+ " R visit(Integer r, A a);\n" + >+ "\n" + >+ " R visit(Number r, A a);\n" + >+ "}\n" + >+ "class Parameter1 {\n" + >+ " \n" + >+ "}\n" + >+ "class Parameter2 {\n" + >+ " \n" + >+ "}\n" + >+ "abstract class VisitorAdapter<A> implements Visitor<Parameter1, A> {\n" + >+ "\n" + >+ " public Parameter1 visit(Long r, A a) {\n" + >+ " return null;\n" + >+ " }\n" + >+ "\n" + >+ " public Parameter1 visit(Integer r, A a) {\n" + >+ " return null;\n" + >+ " }\n" + >+ "\n" + >+ " public Parameter1 visit(Number r, A a) {\n" + >+ " return null;\n" + >+ " }\n" + >+ " \n" + >+ "}\n" >+ }, >+ "----------\n" + >+ "1. WARNING in Caller.java (at line 3)\n" + >+ " private static class VisitorImpl extends VisitorAdapter<Object> {\n" + >+ " ^^^^^^^^^^^\n" + >+ "The type Caller.VisitorImpl is never used locally\n" + >+ "----------\n" + >+ "2. WARNING in Caller.java (at line 21)\n" + >+ " private void accept(Visitor<Parameter1, Parameter2> v) {\n" + >+ " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + >+ "The method accept(Visitor<Parameter1,Parameter2>) from the type Caller is never used locally\n" + >+ "----------\n", >+ options); >+ } >+ > // reported by Christine Hundt > // B.1.1-otjld-ju-1 > public void testB11_ju1() {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 350318
: 198572