Bug 513649: Regression in JDT's GenericsRegressionTest_1_8.testBug511071
- improve solution to gel well with suspendTempErrorHandlingPolicy()
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LambdaExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LambdaExpression.java
index c459c1f..a8e019c 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LambdaExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/LambdaExpression.java
@@ -874,7 +874,8 @@
   :giro */
 		CompilationUnitDeclaration cud = this.enclosingScope.referenceCompilationUnit();
 		ProblemReporter oldReporter = cud.problemReporter;
-		cud.problemReporter = new ProblemReporter(silentErrorHandlingPolicy, oldReporter.options, oldReporter.problemFactory);
+		cud.problemReporter = new ProblemReporter(oldReporter.policy, oldReporter.options, oldReporter.problemFactory);
+		cud.problemReporter.switchErrorHandlingPolicy(silentErrorHandlingPolicy);
 // SH}
 		try {
 			if (copy == null) {