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

Unified Diff: sdk/lib/_internal/lib/js_helper.dart

Issue 54983007: Make test of malformed types a dynamic type error. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 7 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
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/optimize.dart ('k') | tests/co19/co19-co19.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/lib/js_helper.dart
diff --git a/sdk/lib/_internal/lib/js_helper.dart b/sdk/lib/_internal/lib/js_helper.dart
index 98f9798a2cc211129e8d32e427dd9d627e2d449a..6a6ff8e87ecc60e9fff2a3440edcaa07ee500bac 100644
--- a/sdk/lib/_internal/lib/js_helper.dart
+++ b/sdk/lib/_internal/lib/js_helper.dart
@@ -1939,6 +1939,11 @@ voidTypeCheck(value) {
throw new TypeErrorImplementation(value, 'void');
}
+checkMalformedType(value, message) {
+ if (value == null) return value;
+ throw new TypeErrorImplementation.fromMessage(message);
+}
+
/**
* Special interface recognized by the compiler and implemented by DOM
* objects that support integer indexing. This interface is not
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/optimize.dart ('k') | tests/co19/co19-co19.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698