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

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

Issue 1480433002: Add support for assert statements with messages to the analyzer. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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
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 f547807a830a9f9faddff998a7db1c78655414e4..61a6c75beeece4ec4e26e2a2cc0fd966dbdd8793 100644
--- a/pkg/analyzer/lib/src/generated/error.dart
+++ b/pkg/analyzer/lib/src/generated/error.dart
@@ -1178,6 +1178,15 @@ class CompileTimeErrorCode extends ErrorCode {
"This class cannot extend the deferred class '{0}'");
/**
+ * DEP 37 extends the syntax for assert() to allow a second "message"
+ * argument. We issue this error if the user tries to supply a "message"
+ * argument but the DEP is not enabled.
+ */
+ static const CompileTimeErrorCode EXTRA_ARGUMENT_TO_ASSERT =
+ const CompileTimeErrorCode('EXTRA_ARGUMENT_TO_ASSERT',
+ "Assertions only accept a single argument");
+
+ /**
* 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m &lt;
* h</i> or if <i>m &gt; n</i>.
*

Powered by Google App Engine
This is Rietveld 408576698