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 108276 Details for
Bug 241399
"Missing code implementation in the compiler" initializting static generic type
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
proposed patch with simple test
patch-241399.txt (text/plain), 2.73 KB, created by
Stephan Herrmann
on 2008-07-23 18:10:02 EDT
(
hide
)
Description:
proposed patch with simple test
Filename:
MIME Type:
Creator:
Stephan Herrmann
Created:
2008-07-23 18:10:02 EDT
Size:
2.73 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedTypeBinding.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedTypeBinding.java,v >retrieving revision 1.107 >diff -u -r1.107 ParameterizedTypeBinding.java >--- compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedTypeBinding.java 27 Jun 2008 16:04:02 -0000 1.107 >+++ compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedTypeBinding.java 23 Jul 2008 21:58:24 -0000 >@@ -611,6 +611,12 @@ > } > } > >+ public int problemId() { >+ if (this.type != null) >+ return this.type.problemId(); >+ return super.problemId(); >+ } >+ > public boolean hasMemberTypes() { > return this.type.hasMemberTypes(); > } >#P org.eclipse.jdt.core.tests.compiler >Index: src/org/eclipse/jdt/core/tests/compiler/regression/ProblemTypeAndMethodTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ProblemTypeAndMethodTest.java,v >retrieving revision 1.10 >diff -u -r1.10 ProblemTypeAndMethodTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/ProblemTypeAndMethodTest.java 8 Jul 2008 12:58:13 -0000 1.10 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/ProblemTypeAndMethodTest.java 23 Jul 2008 21:58:30 -0000 >@@ -4117,4 +4117,36 @@ > "The import p.zork.Z is never used\n" + > "----------\n"); > } >+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=241399 >+public void test089() { >+ if (this.complianceLevel <= ClassFileConstants.JDK1_4) >+ return; >+ this.runNegativeTest( >+ new String[] { >+ "Test.java", //----------------------------------------------------------------------- >+ "//package foo.bar;\n" + >+ "public class Test {\n" + >+ " private static Map<String, String> var;\n" + >+ " static {\n" + >+ " var= new HashMap<String, String>();\n" + >+ " }\n" + >+ "}\n",//----------------------------------------------------------------------- >+ }, >+ "----------\n" + >+ "1. ERROR in Test.java (at line 3)\n" + >+ " private static Map<String, String> var;\n" + >+ " ^^^\n" + >+ "Map cannot be resolved to a type\n" + >+ "----------\n" + >+ "2. ERROR in Test.java (at line 5)\n" + >+ " var= new HashMap<String, String>();\n" + >+ " ^^^\n" + >+ "Map<String,String> cannot be resolved to a type\n" + >+ "----------\n" + >+ "3. ERROR in Test.java (at line 5)\n" + >+ " var= new HashMap<String, String>();\n" + >+ " ^^^^^^^\n" + >+ "HashMap cannot be resolved to a type\n" + >+ "----------\n"); >+} > }
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 241399
: 108276