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

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

Issue 2825813002: Issue 29358. Fix for reporting constant errors while evaluating constructor invocations. (Closed)
Patch Set: Restore TODO. Created 3 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/analyzer/lib/src/dart/constant/evaluation.dart ('k') | pkg/analyzer/lib/src/generated/resolver.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/error/codes.dart
diff --git a/pkg/analyzer/lib/src/error/codes.dart b/pkg/analyzer/lib/src/error/codes.dart
index 48df41b741e95b3072131ecdaf979932f813baa8..f86f0d9608e9bcf4afdf224d052966fd7011d173 100644
--- a/pkg/analyzer/lib/src/error/codes.dart
+++ b/pkg/analyzer/lib/src/error/codes.dart
@@ -51,6 +51,14 @@ class CheckedModeCompileTimeErrorCode extends ErrorCode {
"'{1}'.");
/**
+ * 16.12.2 Const: It is a compile-time error if evaluation of a constant
+ * object results in an uncaught exception being thrown.
+ */
+ static const CheckedModeCompileTimeErrorCode CONST_EVAL_THROWS_EXCEPTION =
+ const CheckedModeCompileTimeErrorCode('CONST_EVAL_THROWS_EXCEPTION',
+ "Evaluation of this constant expression throws an exception.");
+
+ /**
* 7.6.1 Generative Constructors: In checked mode, it is a dynamic type error
* if o is not <b>null</b> and the interface of the class of <i>o</i> is not a
* subtype of the static type of the field <i>v</i>.
« no previous file with comments | « pkg/analyzer/lib/src/dart/constant/evaluation.dart ('k') | pkg/analyzer/lib/src/generated/resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698