Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(878)

Unified Diff: pkg/analyzer/lib/src/generated/error.dart

Issue 1861363002: Add hooks for changing priorities of warnings to errors in strong mode (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analysis_server/lib/src/protocol_server.dart ('k') | pkg/analyzer_cli/lib/src/analyzer_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/error.dart
diff --git a/pkg/analyzer/lib/src/generated/error.dart b/pkg/analyzer/lib/src/generated/error.dart
index 3345a6168a5fb54e461b070db2214c4e7e876a3a..92f4bab29cf7913ed5b081ab9f83653142d7463e 100644
--- a/pkg/analyzer/lib/src/generated/error.dart
+++ b/pkg/analyzer/lib/src/generated/error.dart
@@ -13,6 +13,7 @@ import 'package:analyzer/dart/element/type.dart';
import 'package:analyzer/source/error_processor.dart';
import 'package:analyzer/src/dart/element/type.dart';
import 'package:analyzer/src/dart/scanner/scanner.dart' show ScannerErrorCode;
+import 'package:analyzer/src/generated/engine.dart';
import 'package:analyzer/src/generated/generated/shared_messages.dart'
as shared_messages;
import 'package:analyzer/src/generated/java_core.dart';
@@ -5703,12 +5704,19 @@ class StaticWarningCode extends ErrorCode {
"Add a case clause for the missing constant or add a default clause.");
/**
+ * A flag indicating whether this warning is an error when running with strong
+ * mode enabled.
+ */
+ final bool isStrongModeError;
+
+ /**
* Initialize a newly created error code to have the given [name]. The message
* associated with the error will be created from the given [message]
* template. The correction associated with the error will be created from the
* given [correction] template.
*/
- const StaticWarningCode(String name, String message, [String correction])
+ const StaticWarningCode(String name, String message,
+ [String correction, this.isStrongModeError = false])
: super(name, message, correction);
@override
« no previous file with comments | « pkg/analysis_server/lib/src/protocol_server.dart ('k') | pkg/analyzer_cli/lib/src/analyzer_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698