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

Unified Diff: test/codegen/expect/collection/wrappers.js

Issue 1484263002: Use destructuring assignments for named parameters (#180) (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years 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 | « test/codegen/expect/collection/src/canonicalized_map.js ('k') | test/codegen/expect/constructors.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/codegen/expect/collection/wrappers.js
diff --git a/test/codegen/expect/collection/wrappers.js b/test/codegen/expect/collection/wrappers.js
index 70b2afee44a1593268a0a068933922253d7086d1..49c94d63cb66b7d4ada79fba297d566e8b53f86c 100644
--- a/test/codegen/expect/collection/wrappers.js
+++ b/test/codegen/expect/collection/wrappers.js
@@ -37,9 +37,8 @@ dart_library.library('collection/wrappers', null, /* Imports */[
get first() {
return this[_base][dartx.first];
}
- firstWhere(test, opts) {
+ firstWhere(test, {orElse = null} = {}) {
dart.as(test, dart.functionType(core.bool, [E]));
- let orElse = opts && 'orElse' in opts ? opts.orElse : null;
dart.as(orElse, dart.functionType(E, []));
return this[_base][dartx.firstWhere](test, {orElse: orElse});
}
@@ -71,9 +70,8 @@ dart_library.library('collection/wrappers', null, /* Imports */[
get last() {
return this[_base][dartx.last];
}
- lastWhere(test, opts) {
+ lastWhere(test, {orElse = null} = {}) {
dart.as(test, dart.functionType(core.bool, [E]));
- let orElse = opts && 'orElse' in opts ? opts.orElse : null;
dart.as(orElse, dart.functionType(E, []));
return this[_base][dartx.lastWhere](test, {orElse: orElse});
}
@@ -109,8 +107,7 @@ dart_library.library('collection/wrappers', null, /* Imports */[
dart.as(test, dart.functionType(core.bool, [E]));
return this[_base][dartx.takeWhile](test);
}
- toList(opts) {
- let growable = opts && 'growable' in opts ? opts.growable : true;
+ toList({growable = true} = {}) {
return this[_base][dartx.toList]({growable: growable});
}
toSet() {
« no previous file with comments | « test/codegen/expect/collection/src/canonicalized_map.js ('k') | test/codegen/expect/constructors.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698