diff options
| author | ssankaran | 2014-02-17 19:17:51 +0000 |
|---|---|---|
| committer | ssankaran | 2014-02-17 19:17:51 +0000 |
| commit | 78bbbeed8347e023a39893a354552d3196a82094 (patch) | |
| tree | 3379846a354bdd44648614fd50242cee87ed9943 | |
| parent | 5493b2d6bd60226b33b413713fa212914e52abb0 (diff) | |
| download | eclipse.jdt.core-78bbbeed8347e023a39893a354552d3196a82094.tar.gz eclipse.jdt.core-78bbbeed8347e023a39893a354552d3196a82094.tar.xz eclipse.jdt.core-78bbbeed8347e023a39893a354552d3196a82094.zip | |
Fixed Bug 427468 - [1.8][compiler] can't resolveP20140217-1600
java.lang.annotation.Annotation from source
2 files changed, 1 insertions, 5 deletions
diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TypeAnnotationTest.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TypeAnnotationTest.java index b03a2ede6f..9fe7cfe4ba 100644 --- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TypeAnnotationTest.java +++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/TypeAnnotationTest.java @@ -6242,7 +6242,6 @@ public class TypeAnnotationTest extends AbstractRegressionTest { checkDisassembledClassFile(OUTPUT_DIR + File.separator + "X.class", "X", expectedOutput, ClassFileBytesDisassembler.SYSTEM); } // https://bugs.eclipse.org/bugs/show_bug.cgi?id=419331, [1.8][compiler] Weird error on forward reference to type annotations from type parameter declarations - // ENCODES WRONG BEHAVIOR - FIX TEST ALONG WITH FIX public void testForwardReference() { this.runNegativeTest( new String[] { diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java index 3fe8dd2c86..fb6b28258f 100644 --- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java +++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java @@ -109,9 +109,6 @@ public SourceTypeBinding(char[][] compoundName, PackageBinding fPackage, ClassSc this.methods = Binding.UNINITIALIZED_METHODS; this.prototype = this; computeId(); - if (this.isAnnotationType()) { // for forward references, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=419331 - this.superInterfaces = new ReferenceBinding [] { scope.getJavaLangAnnotationAnnotation() }; - } } public SourceTypeBinding(SourceTypeBinding prototype) { @@ -2275,7 +2272,7 @@ public ReferenceBinding superclass() { public ReferenceBinding[] superInterfaces() { if (!isPrototype()) return this.superInterfaces = this.prototype.superInterfaces(); - return this.superInterfaces; + return this.superInterfaces != null ? this.superInterfaces : isAnnotationType() ? this.superInterfaces = new ReferenceBinding [] { this.scope.getJavaLangAnnotationAnnotation() } : null; } public SyntheticMethodBinding[] syntheticMethods() { |
