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

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

Issue 11361060: Support checked mode for return type. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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: sdk/lib/_internal/compiler/implementation/lib/js_helper.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/lib/js_helper.dart (revision 14515)
+++ sdk/lib/_internal/compiler/implementation/lib/js_helper.dart (working copy)
@@ -1387,6 +1387,11 @@
propertyTypeCastError(value, property);
}
+voidTypeCheck(value) {
+ if (value == null) return value;
+ throw new TypeErrorImplementation(value, 'void');
+}
+
/**
* Special interface recognized by the compiler and implemented by DOM
* objects that support integer indexing. This interface is not

Powered by Google App Engine
This is Rietveld 408576698