Index: pkg/analysis_server/lib/src/protocol_server.dart |
diff --git a/pkg/analysis_server/lib/src/protocol_server.dart b/pkg/analysis_server/lib/src/protocol_server.dart |
index 138c20f1ca65f25962d436027c0acd3079ef6b70..5c86115ab089712b414835f91297f4be6458f30f 100644 |
--- a/pkg/analysis_server/lib/src/protocol_server.dart |
+++ b/pkg/analysis_server/lib/src/protocol_server.dart |
@@ -43,7 +43,14 @@ List<AnalysisError> doAnalysisError_listFromEngine( |
.add(newAnalysisError_fromEngine(lineInfo, error, severity)); |
} |
} else { |
- serverErrors.add(newAnalysisError_fromEngine(lineInfo, error)); |
+ AnalysisError error2 = newAnalysisError_fromEngine(lineInfo, error); |
+ bool isStrongMode = context.analysisOptions.strongMode; |
+ if (isStrongMode && |
+ error is engine.StaticWarningCode && |
+ (error as engine.StaticWarningCode).isStrongModeError) { |
+ error2.severity = AnalysisErrorSeverity.ERROR; |
+ } |
+ serverErrors.add(error2); |
} |
} |
return serverErrors; |