Undoing PR #2114 which tried to fix issue #1976

This PR does fix that, but introduces its own problem.
See commit immediately following this one for explanation
This commit is contained in:
Reinier Zwitserloot committed 2019-09-10 23:00:14 +02:00
1 parent 67fccba8ef
commit 877a169727
1 file changed
-6
@@ -366,10 +366,6 @@ public class PatchVal {
}
private static TypeBinding resolveForExpression(Expression collection, BlockScope scope) {
CompilationUnitDeclaration referenceContext = scope.compilationUnitScope().referenceContext;
ProblemReporter oldProblemReporter = referenceContext.problemReporter;
referenceContext.problemReporter = new ProblemReporter(DefaultErrorHandlingPolicies.exitOnFirstError(),
oldProblemReporter.options, oldProblemReporter.problemFactory);
try {
return collection.resolveType(scope);
} catch (ArrayIndexOutOfBoundsException e) {
@@ -413,8 +409,6 @@ public class PatchVal {
}
}
throw e;
} finally {
referenceContext.problemReporter = oldProblemReporter;
}
}