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

Unified Diff: lib/runtime/dart/_js_helper.js

Issue 1121993004: Inference through conditional expressions (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Rebase Created 5 years, 7 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 | « lib/runtime/dart/_isolate_helper.js ('k') | lib/runtime/dart/async.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/runtime/dart/_js_helper.js
diff --git a/lib/runtime/dart/_js_helper.js b/lib/runtime/dart/_js_helper.js
index e43d8f434605e86a18e93d87fbba5c037807e73b..73d68c075949a9740eef6037aeb5e74107ec0dc0 100644
--- a/lib/runtime/dart/_js_helper.js
+++ b/lib/runtime/dart/_js_helper.js
@@ -2421,7 +2421,7 @@ var _js_helper;
class NullError extends core.Error {
NullError(message, match) {
this[_message] = message;
- this[_method] = dart.as(match == null ? null : match.method, core.String);
+ this[_method] = match == null ? null : dart.as(match.method, core.String);
super.Error();
}
toString() {
@@ -2434,8 +2434,8 @@ var _js_helper;
class JsNoSuchMethodError extends core.Error {
JsNoSuchMethodError(message, match) {
this[_message] = message;
- this[_method] = dart.as(match == null ? null : match.method, core.String);
- this[_receiver] = dart.as(match == null ? null : match.receiver, core.String);
+ this[_method] = match == null ? null : dart.as(match.method, core.String);
+ this[_receiver] = match == null ? null : dart.as(match.receiver, core.String);
super.Error();
}
toString() {
@@ -2517,7 +2517,7 @@ var _js_helper;
} else if (dart.notNull((match = dart.dsend(nullCall, 'matchTypeError', message)) != null) || dart.notNull((match = dart.dsend(nullLiteralCall, 'matchTypeError', message)) != null) || dart.notNull((match = dart.dsend(undefCall, 'matchTypeError', message)) != null) || dart.notNull((match = dart.dsend(undefLiteralCall, 'matchTypeError', message)) != null) || dart.notNull((match = dart.dsend(nullProperty, 'matchTypeError', message)) != null) || dart.notNull((match = dart.dsend(nullLiteralCall, 'matchTypeError', message)) != null) || dart.notNull((match = dart.dsend(undefProperty, 'matchTypeError', message)) != null) || dart.notNull((match = dart.dsend(undefLiteralProperty, 'matchTypeError', message)) != null)) {
return saveStackTrace(new NullError(dart.as(message, core.String), match));
}
- return saveStackTrace(new UnknownJsTypeError(dart.as(typeof message == 'string' ? message : '', core.String)));
+ return saveStackTrace(new UnknownJsTypeError(typeof message == 'string' ? dart.as(message, core.String) : ''));
}
if (ex instanceof RangeError) {
if (typeof message == 'string' && dart.notNull(contains(dart.as(message, core.String), 'call stack'))) {
« no previous file with comments | « lib/runtime/dart/_isolate_helper.js ('k') | lib/runtime/dart/async.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698