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 125135 Details for
Bug 244164
[1.5][compiler] Missing implementation error when referencing a generic field with error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch for 3.4 maintenance branch
patch_244164_34x.txt (text/plain), 4.83 KB, created by
Olivier Thomann
on 2009-02-09 09:40:30 EST
(
hide
)
Description:
Patch for 3.4 maintenance branch
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2009-02-09 09:40:30 EST
Size:
4.83 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java,v >retrieving revision 1.370.2.1 >diff -u -r1.370.2.1 ProblemReporter.java >--- compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java 27 Nov 2008 10:13:10 -0000 1.370.2.1 >+++ compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java 9 Feb 2009 14:39:12 -0000 >@@ -13,6 +13,7 @@ > import java.io.CharConversionException; > import java.io.PrintWriter; > import java.io.StringWriter; >+import java.util.Iterator; > import java.util.List; > > import org.eclipse.jdt.core.compiler.CategorizedProblem; >@@ -3478,7 +3479,15 @@ > if (isRecoveredName(((ReferenceBinding)leafType).compoundName)) return; > } > } >- >+ if (type.isParameterizedType()) { >+ List missingTypes = type.collectMissingTypes(null); >+ if (missingTypes != null) { >+ for (Iterator iterator = missingTypes.iterator(); iterator.hasNext(); ) { >+ invalidType(location, (TypeBinding) iterator.next()); >+ } >+ return; >+ } >+ } > int id = IProblem.UndefinedType; // default > switch (type.problemId()) { > case ProblemReasons.NotFound : >#P org.eclipse.jdt.core.tests.compiler >Index: src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java,v >retrieving revision 1.727.2.11 >diff -u -r1.727.2.11 GenericTypeTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java 8 Dec 2008 16:29:47 -0000 1.727.2.11 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java 9 Feb 2009 14:39:17 -0000 >@@ -31,7 +31,7 @@ > // All specified tests which does not belong to the class are skipped... > static { > // TESTS_NAMES = new String[] { "test0788" }; >-// TESTS_NUMBERS = new int[] { 1054 }; >+// TESTS_NUMBERS = new int[] { 1367 }; > // TESTS_RANGE = new int[] { 1097, -1 }; > } > public static Test suite() { >@@ -45885,7 +45885,7 @@ > "2. ERROR in X.java (at line 4)\n" + > " var= new HashMap<String, String>();\n" + > " ^^^\n" + >- "Map<String,String> cannot be resolved to a type\n" + >+ "Map cannot be resolved to a type\n" + > "----------\n" + > "3. ERROR in X.java (at line 4)\n" + > " var= new HashMap<String, String>();\n" + >@@ -46379,4 +46379,59 @@ > "Zork cannot be resolved to a type\n" + > "----------\n"); > } >+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=244164 >+public void test1425() { >+ this.runNegativeTest( >+ new String[] { >+ "X.java", //----------------------------------------------------------------------- >+ "import java.util.HashMap;\n" + >+ "import java.util.Map;\n" + >+ "public class X {\n" + >+ " private static Map<String, Zork> map = new HashMap<String, X>();\n" + >+ " public static X foo(String s) {\n" + >+ " return map.get(s);\n" + >+ " }\n" + >+ "}",//----------------------------------------------------------------------- >+ }, >+ "----------\n" + >+ "1. ERROR in X.java (at line 4)\n" + >+ " private static Map<String, Zork> map = new HashMap<String, X>();\n" + >+ " ^^^^\n" + >+ "Zork cannot be resolved to a type\n" + >+ "----------\n" + >+ "2. ERROR in X.java (at line 6)\n" + >+ " return map.get(s);\n" + >+ " ^^^\n" + >+ "Zork cannot be resolved to a type\n" + >+ "----------\n"); >+} >+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=244164 >+public void test1426() { >+ this.runNegativeTest( >+ new String[] { >+ "X.java", //----------------------------------------------------------------------- >+ "class X {\n" + >+ " A<E> a; // E is undefined on purpose\n" + >+ " X() { a = new A<E>(); } // causes Missing code implementation\n" + >+ "}", >+ "A.java", >+ "class A<E> {}",//----------------------------------------------------------------------- >+ }, >+ "----------\n" + >+ "1. ERROR in X.java (at line 2)\n" + >+ " A<E> a; // E is undefined on purpose\n" + >+ " ^\n" + >+ "E cannot be resolved to a type\n" + >+ "----------\n" + >+ "2. ERROR in X.java (at line 3)\n" + >+ " X() { a = new A<E>(); } // causes Missing code implementation\n" + >+ " ^\n" + >+ "E cannot be resolved to a type\n" + >+ "----------\n" + >+ "3. ERROR in X.java (at line 3)\n" + >+ " X() { a = new A<E>(); } // causes Missing code implementation\n" + >+ " ^\n" + >+ "E cannot be resolved to a type\n" + >+ "----------\n"); >+} > } >\ No newline at end of file
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 244164
:
110000
|
112086
|
112103
| 125135