Index: pkg/compiler/lib/src/diagnostics/messages.dart |
diff --git a/pkg/compiler/lib/src/diagnostics/messages.dart b/pkg/compiler/lib/src/diagnostics/messages.dart |
index 8fabdf8e91de92285ee11fdaf233fa78b8fb7efa..f2911585d5b3067de168eb7006480f1acecf7b6a 100644 |
--- a/pkg/compiler/lib/src/diagnostics/messages.dart |
+++ b/pkg/compiler/lib/src/diagnostics/messages.dart |
@@ -188,6 +188,7 @@ enum MessageKind { |
EXISTING_DEFINITION, |
EXISTING_LABEL, |
EXPECTED_IDENTIFIER_NOT_RESERVED_WORD, |
+ EXPERIMENTAL_ASSERT_MESSAGE, |
EXPONENT_MISSING, |
EXPORT_BEFORE_PARTS, |
EXTERNAL_WITH_BODY, |
@@ -3269,6 +3270,19 @@ main() => foo(); |
// Patch errors end. |
////////////////////////////////////////////////////////////////////////////// |
+ MessageKind.EXPERIMENTAL_ASSERT_MESSAGE: |
+ const MessageTemplate(MessageKind.EXPERIMENTAL_ASSERT_MESSAGE, |
+ "Experimental language feature 'assertion with message'" |
+ " is not supported.", |
+ howToFix: |
+ "Use option '--assert-message' to use assertions with messages.", |
+ examples: const [r''' |
+main() { |
+ int n = -7; |
+ assert(n > 0, 'must be positive: $n'); |
+} |
+''']), |
+ |
MessageKind.IMPORT_EXPERIMENTAL_MIRRORS: |
const MessageTemplate(MessageKind.IMPORT_EXPERIMENTAL_MIRRORS, r''' |