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 205590 Details for
Bug 360164
Compile error in XSDImpl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Additional fixes & tests
patch.txt (text/plain), 4.59 KB, created by
Srikanth Sankaran
on 2011-10-20 04:25:17 EDT
(
hide
)
Description:
Additional fixes & tests
Filename:
MIME Type:
Creator:
Srikanth Sankaran
Created:
2011-10-20 04:25:17 EDT
Size:
4.59 KB
patch
obsolete
>diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ProblemTypeAndMethodTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ProblemTypeAndMethodTest.java >index 986755e..4be62b1 100644 >--- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ProblemTypeAndMethodTest.java >+++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ProblemTypeAndMethodTest.java >@@ -7111,4 +7111,81 @@ > compilerOptions /* custom options */ > ); > } >+// https://bugs.eclipse.org/bugs/show_bug.cgi?id=360164 >+public void test360164() { >+ if (this.complianceLevel < ClassFileConstants.JDK1_5) return; >+ this.runConformTest( >+ new String[] { >+ "p/B.java", >+ "package p;\n" + >+ "\n" + >+ "public abstract class B<K,V> {\n" + >+ " protected abstract V foo(K element);\n" + >+ "}\n", >+ "p/C.java", >+ "package p;\n" + >+ "public class C {\n" + >+ "}\n", >+ "p/D.java", >+ "package p;\n" + >+ "public class D extends E {\n" + >+ "}\n", >+ "p/E.java", >+ "package p;\n" + >+ "public abstract class E implements I {\n" + >+ "}\n", >+ "p/I.java", >+ "package p;\n" + >+ "public interface I {\n" + >+ "}\n", >+ "p/X.java", >+ "package p;\n" + >+ "public class X {\n" + >+ " private final class A extends B<C,D>{\n" + >+ " @Override\n" + >+ " protected D foo(C c) {\n" + >+ " return null;\n" + >+ " }\n" + >+ " }\n" + >+ "}\n", >+ }, >+ ""); >+ >+ // delete binary file Zork (i.e. simulate removing it from classpath for subsequent compile) >+ Util.delete(new File(OUTPUT_DIR, "p" + File.separator + "I.class")); >+ >+ runNegativeTest( >+ // test directory preparation >+ false /* do not flush output directory */, >+ new String[] { /* test files */ >+ "p/X.java", >+ "package p;\n" + >+ "public class X {\n" + >+ " private final class A extends B<C,D>{\n" + >+ " @Override\n" + >+ " protected D foo(C c) {\n" + >+ " Zork z;\n" + >+ " return null;\n" + >+ " }\n" + >+ " }\n" + >+ "}\n", >+ }, >+ // compiler options >+ null /* no class libraries */, >+ null /* no custom options */, >+ // compiler results >+ "----------\n" + >+ "1. WARNING in p\\X.java (at line 3)\n" + >+ " private final class A extends B<C,D>{\n" + >+ " ^\n" + >+ "The type X.A is never used locally\n" + >+ "----------\n" + >+ "2. ERROR in p\\X.java (at line 6)\n" + >+ " Zork z;\n" + >+ " ^^^^\n" + >+ "Zork cannot be resolved to a type\n" + >+ "----------\n", >+ // javac options >+ JavacTestOptions.SKIP_UNTIL_FRAMEWORK_FIX /* javac test options */); >+} > } >diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java >index 8a84619..b8581e3 100644 >--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java >+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BinaryTypeBinding.java >@@ -1157,8 +1157,14 @@ > this.tagBits |= TagBits.HierarchyHasProblems; // propagate type inconsistency > } else { > // make super-type resolving recursive for propagating typeBits downwards >- this.superclass.superclass(); >- this.superclass.superInterfaces(); >+ boolean wasToleratingMissingTypeProcessingAnnotations = this.environment.mayTolerateMissingType; >+ this.environment.mayTolerateMissingType = true; // https://bugs.eclipse.org/bugs/show_bug.cgi?id=360164 >+ try { >+ this.superclass.superclass(); >+ this.superclass.superInterfaces(); >+ } finally { >+ this.environment.mayTolerateMissingType = wasToleratingMissingTypeProcessingAnnotations; >+ } > } > this.typeBits |= this.superclass.typeBits; > return this.superclass; >@@ -1174,8 +1180,14 @@ > this.tagBits |= TagBits.HierarchyHasProblems; // propagate type inconsistency > } else { > // make super-type resolving recursive for propagating typeBits downwards >- this.superInterfaces[i].superclass(); >- this.superInterfaces[i].superInterfaces(); >+ boolean wasToleratingMissingTypeProcessingAnnotations = this.environment.mayTolerateMissingType; >+ this.environment.mayTolerateMissingType = true; // https://bugs.eclipse.org/bugs/show_bug.cgi?id=360164 >+ try { >+ this.superInterfaces[i].superclass(); >+ this.superInterfaces[i].superInterfaces(); >+ } finally { >+ this.environment.mayTolerateMissingType = wasToleratingMissingTypeProcessingAnnotations; >+ } > } > this.typeBits |= this.superInterfaces[i].typeBits; > }
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 Raw
Actions:
View
Attachments on
bug 360164
:
204725
|
204799
|
205181
|
205424
| 205590