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

Side by Side Diff: test/codegen/expect/closure.js

Issue 1677863002: Use default params when --destructure-named-params + fix renaming of reserved destructured params (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 10 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 unified diff | Download patch
« no previous file with comments | « test/codegen/destructuring.dart ('k') | test/codegen/expect/destructuring.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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 * @return {string} 48 * @return {string}
49 */ 49 */
50 typed_method(foo, list, i, n, d, b, s, a, o, f) { 50 typed_method(foo, list, i, n, d, b, s, a, o, f) {
51 return ''; 51 return '';
52 } 52 }
53 /** 53 /**
54 * @param {?} a 54 * @param {?} a
55 * @param {?=} b 55 * @param {?=} b
56 * @param {?=} c 56 * @param {?=} c
57 */ 57 */
58 optional_params(a, b, c) { 58 optional_params(a, b = null, c = null) {}
59 if (b === void 0) b = null;
60 if (c === void 0) c = null;
61 }
62 /** 59 /**
63 * @param {?} a 60 * @param {?} a
64 * @param {{b: (?|undefined), c: (?|undefined)}=} opts 61 * @param {{b: (?|undefined), c: (?|undefined)}=} opts
65 */ 62 */
66 static named_params(a, opts) { 63 static named_params(a, {b = null, c = null} = {}) {}
67 let b = opts && 'b' in opts ? opts.b : null;
68 let c = opts && 'c' in opts ? opts.c : null;
69 }
70 nullary_method() {} 64 nullary_method() {}
71 /** 65 /**
72 * @param {function(?, ?=):?number} f 66 * @param {function(?, ?=):?number} f
73 * @param {function(?, {y: (string|undefined), z: (?|undefined)}=):?} g 67 * @param {function(?, {y: (string|undefined), z: (?|undefined)}=):?} g
74 * @param {Callback} cb 68 * @param {Callback} cb
75 */ 69 */
76 function_params(f, g, cb) { 70 function_params(f, g, cb) {
77 dart.as(f, dart.functionType(core.int, [dart.dynamic], [dart.dynamic])); 71 dart.as(f, dart.functionType(core.int, [dart.dynamic], [dart.dynamic]));
78 dart.as(g, dart.functionType(dart.dynamic, [dart.dynamic], {y: core.Stri ng, z: dart.dynamic})); 72 dart.as(g, dart.functionType(dart.dynamic, [dart.dynamic], {y: core.Stri ng, z: dart.dynamic}));
79 cb({i: this.i}); 73 cb({i: this.i});
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 exports.some_top_level_var = "abc"; 133 exports.some_top_level_var = "abc";
140 // Exports: 134 // Exports:
141 exports.Callback = Callback; 135 exports.Callback = Callback;
142 exports.Foo$ = Foo$; 136 exports.Foo$ = Foo$;
143 exports.Foo = Foo; 137 exports.Foo = Foo;
144 exports.Bar = Bar; 138 exports.Bar = Bar;
145 exports.Baz = Baz; 139 exports.Baz = Baz;
146 exports.main = main; 140 exports.main = main;
147 exports.some_top_level_constant = some_top_level_constant; 141 exports.some_top_level_constant = some_top_level_constant;
148 }); 142 });
OLDNEW
« no previous file with comments | « test/codegen/destructuring.dart ('k') | test/codegen/expect/destructuring.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698