Index: compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java,v retrieving revision 1.415 diff -u -r1.415 ProblemReporter.java --- compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java 20 Jul 2010 02:25:58 -0000 1.415 +++ compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java 24 Jul 2010 12:43:10 -0000 @@ -3668,7 +3668,12 @@ List missingTypes = type.collectMissingTypes(null); if (missingTypes != null) { for (Iterator iterator = missingTypes.iterator(); iterator.hasNext(); ) { - invalidType(location, (TypeBinding) iterator.next()); + ReferenceContext savedContext = this.referenceContext; + try { + invalidType(location, (TypeBinding) iterator.next()); + } finally { + this.referenceContext = savedContext; + } } return; }