Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 210429
Collapse All | Expand All

(-)compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java (+41 lines)
Lines 819-824 Link Here
819
			TypeDeclaration typeDeclaration = this.memberTypes[i];
819
			TypeDeclaration typeDeclaration = this.memberTypes[i];
820
			typeDeclaration.parseMethods(parser, unit);
820
			typeDeclaration.parseMethods(parser, unit);
821
			this.bits |= (typeDeclaration.bits & ASTNode.HasSyntaxErrors);
821
			this.bits |= (typeDeclaration.bits & ASTNode.HasSyntaxErrors);
822
			Annotation[] annotations2 = typeDeclaration.annotations;
823
			if (annotations2 != null) {
824
				parseMethodsInsideAnnotations(parser, unit, annotations2);
825
			}
822
		}
826
		}
823
	}
827
	}
824
828
Lines 829-834 Link Here
829
			AbstractMethodDeclaration abstractMethodDeclaration = this.methods[i];
833
			AbstractMethodDeclaration abstractMethodDeclaration = this.methods[i];
830
			abstractMethodDeclaration.parseStatements(parser, unit);
834
			abstractMethodDeclaration.parseStatements(parser, unit);
831
			this.bits |= (abstractMethodDeclaration.bits & ASTNode.HasSyntaxErrors);
835
			this.bits |= (abstractMethodDeclaration.bits & ASTNode.HasSyntaxErrors);
836
			Annotation[] annotations2 = abstractMethodDeclaration.annotations;
837
			if (annotations2 != null) {
838
				parseMethodsInsideAnnotations(parser, unit, annotations2);
839
			}
832
		}
840
		}
833
	}
841
	}
834
842
Lines 843-848 Link Here
843
					this.bits |= (fieldDeclaration.bits & ASTNode.HasSyntaxErrors);
851
					this.bits |= (fieldDeclaration.bits & ASTNode.HasSyntaxErrors);
844
					break;
852
					break;
845
			}
853
			}
854
			Annotation[] annotations2 = fieldDeclaration.annotations;
855
			if (annotations2 != null) {
856
				parseMethodsInsideAnnotations(parser, unit, annotations2);
857
			}
858
		}
859
	}
860
}
861
862
private void parseMethodsInsideAnnotations(Parser parser, CompilationUnitDeclaration unit, Annotation[] annotations2) {
863
	for (int j = 0, max = annotations2.length; j < max; j++) {
864
		Annotation annotation = annotations2[j];
865
		if (annotation instanceof NormalAnnotation) {
866
			NormalAnnotation normalAnnotation = (NormalAnnotation) annotation;
867
			MemberValuePair[] memberValuePairs = normalAnnotation.memberValuePairs;
868
			for (int k = 0, max2 = memberValuePairs.length; k < max2; k++) {
869
				MemberValuePair memberValuePair = memberValuePairs[k];
870
				Expression value2 = memberValuePair.value;
871
				if (value2 instanceof QualifiedAllocationExpression) {
872
					QualifiedAllocationExpression expression = (QualifiedAllocationExpression) value2;
873
					TypeDeclaration typeDeclaration = expression.anonymousType;
874
					typeDeclaration.parseMethods(parser, unit);
875
					this.bits |= (typeDeclaration.bits & ASTNode.HasSyntaxErrors);
876
				}
877
			}
878
		} else if (annotation instanceof SingleMemberAnnotation) {
879
			SingleMemberAnnotation singleMemberAnnotation = (SingleMemberAnnotation) annotation;
880
			Expression value2 = singleMemberAnnotation.memberValue;
881
			if (value2 instanceof QualifiedAllocationExpression) {
882
				QualifiedAllocationExpression expression = (QualifiedAllocationExpression) value2;
883
				TypeDeclaration typeDeclaration = expression.anonymousType;
884
				typeDeclaration.parseMethods(parser, unit);
885
				this.bits |= (typeDeclaration.bits & ASTNode.HasSyntaxErrors);
886
			}
846
		}
887
		}
847
	}
888
	}
848
}
889
}

Return to bug 210429