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

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

Issue 1122283002: fixes #158, precendence of call and access in new (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: redesgin 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/async.js ('k') | lib/runtime/dart/core.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/runtime/dart/collection.js
diff --git a/lib/runtime/dart/collection.js b/lib/runtime/dart/collection.js
index 0258338ce0d561978060bc1d6c4f3552f4b1246b..febdf94eb2292b7e46d83dda7048ee178902e808 100644
--- a/lib/runtime/dart/collection.js
+++ b/lib/runtime/dart/collection.js
@@ -560,10 +560,10 @@ var collection;
}
[core.$toList](opts) {
let growable = opts && 'growable' in opts ? opts.growable : true;
- return new core.List$(E).from(this, {growable: growable});
+ return new (core.List$(E)).from(this, {growable: growable});
}
[core.$toSet]() {
- return new core.Set$(E).from(this);
+ return new (core.Set$(E)).from(this);
}
get [core.$length]() {
dart.assert(!dart.is(this, _internal.EfficientLength));
@@ -776,10 +776,10 @@ var collection;
}
[core.$toList](opts) {
let growable = opts && 'growable' in opts ? opts.growable : true;
- return new core.List$(E).from(this, {growable: growable});
+ return new (core.List$(E)).from(this, {growable: growable});
}
[core.$toSet]() {
- return new core.Set$(E).from(this);
+ return new (core.Set$(E)).from(this);
}
get [core.$length]() {
dart.assert(!dart.is(this, _internal.EfficientLength));
@@ -2224,7 +2224,7 @@ var collection;
return new (ListQueue$(E))();
}
from(elements) {
- return new ListQueue$(E).from(elements);
+ return new (ListQueue$(E)).from(elements);
}
[Symbol.iterator]() {
return new dart.JsIterator(this[core.$iterator]);
« no previous file with comments | « lib/runtime/dart/async.js ('k') | lib/runtime/dart/core.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698