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

Side by Side Diff: test/codegen/expect/closure.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 unified diff | Download patch
« no previous file with comments | « lib/src/js/template.dart ('k') | test/codegen/expect/collection/algorithms.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 dart_library.library('closure', null, /* Imports */[ 1 dart_library.library('closure', null, /* Imports */[
2 "dart/_runtime", 2 "dart/_runtime",
3 'dart/core', 3 'dart/core',
4 'dart/js' 4 'dart/js'
5 ], /* Lazy imports */[ 5 ], /* Lazy imports */[
6 ], function(exports, dart, core, js) { 6 ], function(exports, dart, core, js) {
7 'use strict'; 7 'use strict';
8 let dartx = dart.dartx; 8 let dartx = dart.dartx;
9 /** @typedef {function({i: (?number|undefined)}=)} */ 9 /** @typedef {function({i: (?number|undefined)}=)} */
10 const Callback = dart.typedef('Callback', () => dart.functionType(dart.void, [ ], {i: core.int})); 10 const Callback = dart.typedef('Callback', () => dart.functionType(dart.void, [ ], {i: core.int}));
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 optional_params(a, b, c) { 58 optional_params(a, b, c) {
59 if (b === void 0) 59 if (b === void 0)
60 b = null; 60 b = null;
61 if (c === void 0) 61 if (c === void 0)
62 c = null; 62 c = null;
63 } 63 }
64 /** 64 /**
65 * @param {?} a 65 * @param {?} a
66 * @param {{b: (?|undefined), c: (?|undefined)}=} opts 66 * @param {{b: (?|undefined), c: (?|undefined)}=} opts
67 */ 67 */
68 static named_params(a, opts) { 68 static named_params(a, {b = null, c = null} = {}) {}
69 let b = opts && 'b' in opts ? opts.b : null;
70 let c = opts && 'c' in opts ? opts.c : null;
71 }
72 nullary_method() {} 69 nullary_method() {}
73 /** 70 /**
74 * @param {function(?, ?=):?number} f 71 * @param {function(?, ?=):?number} f
75 * @param {function(?, {y: (string|undefined), z: (?|undefined)}=):?} g 72 * @param {function(?, {y: (string|undefined), z: (?|undefined)}=):?} g
76 * @param {Callback} cb 73 * @param {Callback} cb
77 */ 74 */
78 function_params(f, g, cb) { 75 function_params(f, g, cb) {
79 dart.as(f, dart.functionType(core.int, [dart.dynamic], [dart.dynamic])); 76 dart.as(f, dart.functionType(core.int, [dart.dynamic], [dart.dynamic]));
80 dart.as(g, dart.functionType(dart.dynamic, [dart.dynamic], {y: core.Stri ng, z: dart.dynamic})); 77 dart.as(g, dart.functionType(dart.dynamic, [dart.dynamic], {y: core.Stri ng, z: dart.dynamic}));
81 cb({i: this.i}); 78 cb({i: this.i});
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 exports.some_top_level_var = "abc"; 137 exports.some_top_level_var = "abc";
141 // Exports: 138 // Exports:
142 exports.Callback = Callback; 139 exports.Callback = Callback;
143 exports.Foo$ = Foo$; 140 exports.Foo$ = Foo$;
144 exports.Foo = Foo; 141 exports.Foo = Foo;
145 exports.Bar = Bar; 142 exports.Bar = Bar;
146 exports.Baz = Baz; 143 exports.Baz = Baz;
147 exports.main = main; 144 exports.main = main;
148 exports.some_top_level_constant = some_top_level_constant; 145 exports.some_top_level_constant = some_top_level_constant;
149 }); 146 });
OLDNEW
« no previous file with comments | « lib/src/js/template.dart ('k') | test/codegen/expect/collection/algorithms.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698