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 108236 Details for
Bug 239439
[1.5][compiler] Behavior change for binding for parameterized type
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix + regression tests for HEAD
patch_239439.txt (text/plain), 6.31 KB, created by
Olivier Thomann
on 2008-07-23 13:43:31 EDT
(
hide
)
Description:
Proposed fix + regression tests for HEAD
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2008-07-23 13:43:31 EDT
Size:
6.31 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 17:41:42 -0000 >@@ -786,7 +786,9 @@ > } > return this.methods; > } >- >+ public int problemId() { >+ return this.type.problemId(); >+ } > /** > * @see org.eclipse.jdt.internal.compiler.lookup.TypeBinding#qualifiedPackageName() > */ >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java,v >retrieving revision 1.270 >diff -u -r1.270 ASTConverter15Test.java >--- src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java 27 Jun 2008 16:02:37 -0000 1.270 >+++ src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java 23 Jul 2008 17:41:49 -0000 >@@ -46,7 +46,7 @@ > } > > static { >-// TESTS_NUMBERS = new int[] { 239 }; >+// TESTS_NUMBERS = new int[] { 316, 317 }; > // TESTS_RANGE = new int[] { 308, -1 }; > // TESTS_NAMES = new String[] {"test0204"}; > } >@@ -10122,10 +10122,10 @@ > public void test0312() throws JavaModelException { > String[] bindingKeys = new String[] {"Ljava/util/Map<Ljava/lang/Class<Ljava/lang/Class;*>;Ljava/util/List<LUnknown;>;>;"}; > BindingRequestor requestor = new BindingRequestor(); >- resolveASTs(new ICompilationUnit[] {} , bindingKeys, requestor, getJavaProject("Converter15"), null); >+ resolveASTs(new ICompilationUnit[] {} , bindingKeys, requestor, getJavaProject("Converter15"), null); > assertBindingsEqual( >- "<null>", >- requestor.getBindings(bindingKeys)); >+ "<null>", >+ requestor.getBindings(bindingKeys)); > } > > /* >@@ -10135,10 +10135,10 @@ > public void test0313() throws JavaModelException { > String[] bindingKeys = new String[] {"Ljava/util/Collections;.emptyMap<K:Ljava/lang/Object;V:Ljava/lang/Object;>()Ljava/util/Map<TK;TV;>;%<Ljava/lang/Class<Ljava/lang/Class;*>;Ljava/util/List<LUnknown;>;>"}; > BindingRequestor requestor = new BindingRequestor(); >- resolveASTs(new ICompilationUnit[] {} , bindingKeys, requestor, getJavaProject("Converter15"), null); >+ resolveASTs(new ICompilationUnit[] {} , bindingKeys, requestor, getJavaProject("Converter15"), null); > assertBindingsEqual( >- "<null>", >- requestor.getBindings(bindingKeys)); >+ "<null>", >+ requestor.getBindings(bindingKeys)); > } > > /* >@@ -10148,10 +10148,10 @@ > public void test0314() throws JavaModelException { > String[] bindingKeys = new String[] {"Ljava/util/List<LZork;>.Map<Ljava/lang/Object;Ljava/lang/Number;>;"}; > BindingRequestor requestor = new BindingRequestor(); >- resolveASTs(new ICompilationUnit[] {} , bindingKeys, requestor, getJavaProject("Converter15"), null); >+ resolveASTs(new ICompilationUnit[] {} , bindingKeys, requestor, getJavaProject("Converter15"), null); > assertBindingsEqual( >- "<null>", >- requestor.getBindings(bindingKeys)); >+ "<null>", >+ requestor.getBindings(bindingKeys)); > } > /* > * https://bugs.eclipse.org/bugs/show_bug.cgi?id=120082 >@@ -10159,21 +10159,67 @@ > public void test0315() throws JavaModelException { > this.workingCopy = getWorkingCopy("/Converter15/src/pack1/E.java", true/*resolve*/); > ASTNode node = buildAST( >- "package pack1;\n" + >- "public class E<X> {\n" + >- " public static <T> E<T> bar(T t) {\n" + >- " return null;\n" + >- " }\n" + >- "\n" + >- " public void foo(E<?> e) {\n" + >- " /*start*/bar(e)/*end*/;\n" + >- " }\n" + >- "}", >- this.workingCopy); >+ "package pack1;\n" + >+ "public class E<X> {\n" + >+ " public static <T> E<T> bar(T t) {\n" + >+ " return null;\n" + >+ " }\n" + >+ "\n" + >+ " public void foo(E<?> e) {\n" + >+ " /*start*/bar(e)/*end*/;\n" + >+ " }\n" + >+ "}", >+ this.workingCopy); > IBinding binding = ((MethodInvocation) node).resolveTypeBinding(); > assertBindingKeyEquals( >- "Lpack1/E<Lpack1/E<!Lpack1/E;*122;>;>;", >- binding.getKey()); >+ "Lpack1/E<Lpack1/E<!Lpack1/E;*122;>;>;", >+ binding.getKey()); >+ } >+ /* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=239439 >+ */ >+ public void test0316() throws JavaModelException { >+ this.workingCopy = getWorkingCopy("/Converter15/src/test0316/X.java", true/*resolve*/); >+ ClassInstanceCreation expression = (ClassInstanceCreation) buildAST( >+ "package test0316;\n" + >+ "class AbstractClass {\n" + >+ " XXList<Class> statements = null;\n" + >+ "}\n" + >+ "import java.util.ArrayList;\n" + >+ "public class X extends AbstractClass {\n" + >+ " public List<Class> compute() {\n" + >+ " statements = /*start*/new ArrayList<Class>()/*end*/;\n" + >+ " return statements;\n" + >+ " }\n" + >+ "}", >+ this.workingCopy, >+ false, >+ true, >+ true); >+ ITypeBinding typeBinding = expression.resolveTypeBinding(); >+ assertNotNull("No type binding", typeBinding); >+ } >+ /* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=239439 >+ */ >+ public void test0317() throws JavaModelException { >+ this.workingCopy = getWorkingCopy("/Converter15/src/test0317/X.java", true/*resolve*/); >+ ClassInstanceCreation expression = (ClassInstanceCreation) buildAST( >+ "package test0317;\n" + >+ "import java.util.ArrayList;\n" + >+ "import java.util.List;\n" + >+ "public class X {\n" + >+ " XXList<Class> statements = null;\n" + >+ " public List<Class> compute() {\n" + >+ " statements = /*start*/new ArrayList<Class>()/*end*/;\n" + >+ " return statements;\n" + >+ " }\n" + >+ "}", >+ this.workingCopy, >+ false, >+ true, >+ true); >+ ITypeBinding typeBinding = expression.resolveTypeBinding(); >+ assertNotNull("No type binding", typeBinding); > } >- > } >\ 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 239439
: 108236