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

Unified Diff: pkg/dev_compiler/lib/js/amd/dart_sdk.js

Side-by-side diff isn't available for this file because of its large size.
Issue 2636313002: Throw TypeError on arg mismatch (Closed)
Patch Set: Created 3 years, 11 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:
Download patch
« no previous file with comments | « no previous file | pkg/dev_compiler/lib/js/common/dart_sdk.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/dev_compiler/lib/js/amd/dart_sdk.js
diff --git a/pkg/dev_compiler/lib/js/amd/dart_sdk.js b/pkg/dev_compiler/lib/js/amd/dart_sdk.js
index ebd0c84010463350dc792e95aa561ea649381a52..5f518fcf6710ac69ef6c68dd96572fe84b81658e 100644
--- a/pkg/dev_compiler/lib/js/amd/dart_sdk.js
+++ b/pkg/dev_compiler/lib/js/amd/dart_sdk.js
@@ -1780,7 +1780,7 @@ define([], function() {
if (actuals.length < type.args.length) return false;
let index = 0;
for (let i = 0; i < type.args.length; ++i) {
- if (!dart.instanceOfOrNull(actuals[i], type.args[i])) return false;
+ dart.check(actuals[i], type.args[i]);
++index;
}
if (actuals.length == type.args.length) return true;
@@ -1788,7 +1788,7 @@ define([], function() {
if (type.optionals.length > 0) {
if (extras > type.optionals.length) return false;
for (let i = 0, j = index; i < extras; ++i, ++j) {
- if (!dart.instanceOfOrNull(actuals[j], type.optionals[i])) return false;
+ dart.check(actuals[j], type.optionals[i]);
}
return true;
}
@@ -1801,7 +1801,7 @@ define([], function() {
if (!dart.hasOwnProperty.call(type.named, name)) {
return false;
}
- if (!dart.instanceOfOrNull(opts[name], type.named[name])) return false;
+ dart.check(opts[name], type.named[name]);
}
return true;
};
« no previous file with comments | « no previous file | pkg/dev_compiler/lib/js/common/dart_sdk.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698