View | Details | Raw Unified | Return to bug 258906 | Differences between
and this patch

Collapse All | Expand All

(-)compiler/org/eclipse/jdt/internal/compiler/ast/Annotation.java (-1 / +5 lines)
Lines 376-383 Link Here
376
						if (((ReferenceBinding)this.recipient).isAnnotationType()) {
376
						if (((ReferenceBinding)this.recipient).isAnnotationType()) {
377
							if ((metaTagBits & (TagBits.AnnotationForAnnotationType|TagBits.AnnotationForType)) != 0)
377
							if ((metaTagBits & (TagBits.AnnotationForAnnotationType|TagBits.AnnotationForType)) != 0)
378
							break checkTargetCompatibility;
378
							break checkTargetCompatibility;
379
						} else if ((metaTagBits & TagBits.AnnotationForType) != 0)
379
						} else if ((metaTagBits & TagBits.AnnotationForType) != 0) {
380
							break checkTargetCompatibility;
380
							break checkTargetCompatibility;
381
						} else if ((metaTagBits & TagBits.AnnotationForPackage) != 0) {
382
							if (CharOperation.equals(((ReferenceBinding)this.recipient).sourceName, TypeConstants.PACKAGE_INFO_NAME))
383
								break checkTargetCompatibility;
384
						}
381
						break;
385
						break;
382
					case Binding.METHOD :
386
					case Binding.METHOD :
383
						if (((MethodBinding)this.recipient).isConstructor()) {
387
						if (((MethodBinding)this.recipient).isConstructor()) {
(-)compiler/org/eclipse/jdt/internal/compiler/ast/CompilationUnitDeclaration.java (-3 lines)
Lines 342-350 Link Here
342
		}
342
		}
343
		return;
343
		return;
344
	}
344
	}
345
	if (isPackageInfo() && this.types != null && this.currentPackage!= null && this.currentPackage.annotations != null) {
346
		this.types[0].annotations = this.currentPackage.annotations;
347
	}
348
	try {
345
	try {
349
		if (this.types != null) {
346
		if (this.types != null) {
350
			for (int i = 0, count = this.types.length; i < count; i++)
347
			for (int i = 0, count = this.types.length; i < count; i++)
(-)compiler/org/eclipse/jdt/internal/compiler/lookup/CompilationUnitScope.java (+3 lines)
Lines 100-105 Link Here
100
				declaration.modifiers = ClassFileConstants.AccDefault | ClassFileConstants.AccInterface;
100
				declaration.modifiers = ClassFileConstants.AccDefault | ClassFileConstants.AccInterface;
101
				firstIsSynthetic = true;
101
				firstIsSynthetic = true;
102
			}
102
			}
103
			// ensure the package annotations are copied over before resolution
104
			if (this.referenceContext.currentPackage != null)
105
				this.referenceContext.types[0].annotations = this.referenceContext.currentPackage.annotations;
103
		}
106
		}
104
		recordQualifiedReference(this.currentPackageName); // always dependent on your own package
107
		recordQualifiedReference(this.currentPackageName); // always dependent on your own package
105
	}
108
	}

Return to bug 258906