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

Unified Diff: runtime/lib/errors_patch.dart

Issue 2002923002: Implement assert in initializer list in VM. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Addressed comments. PTAL Created 4 years, 4 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 | « no previous file | runtime/vm/parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/errors_patch.dart
diff --git a/runtime/lib/errors_patch.dart b/runtime/lib/errors_patch.dart
index 89ade45e16c658ffda151d18fe5b6fdeafefc758..77251fecb08b8b081c8399a98dac8b0df31d7c3d 100644
--- a/runtime/lib/errors_patch.dart
+++ b/runtime/lib/errors_patch.dart
@@ -35,6 +35,12 @@ class _AssertionError extends Error implements AssertionError {
}
}
+ static void _checkConstAssertion(bool condition, int start, int end) {
+ if (!condition) {
+ _throwNew(start, end);
+ }
+ }
+
String toString() {
if (_url == null) {
return _failedAssertion;
« no previous file with comments | « no previous file | runtime/vm/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698