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

Unified Diff: test/codegen/expect/methods.js

Issue 1484263002: Use destructuring assignments for named parameters (#180) (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Destructure function params directly (no more opts in most cases) Created 5 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: test/codegen/expect/methods.js
diff --git a/test/codegen/expect/methods.js b/test/codegen/expect/methods.js
index 0448e9abb6ba513793f3cad7ea0223780beb5082..e87853a71f8318733cc95127a6a4eef91df9cba0 100644
--- a/test/codegen/expect/methods.js
+++ b/test/codegen/expect/methods.js
@@ -26,12 +26,10 @@ dart_library.library('methods', null, /* Imports */[
b = 0;
return b;
}
- w(a, opts) {
- let b = opts && 'b' in opts ? opts.b : null;
+ w(a, {b = null} = {}) {
return dart.asInt(dart.notNull(a) + dart.notNull(b));
}
- ww(a, opts) {
- let b = opts && 'b' in opts ? opts.b : 0;
+ ww(a, {b = 0} = {}) {
return dart.notNull(a) + dart.notNull(b);
}
get a() {

Powered by Google App Engine
This is Rietveld 408576698