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

Unified Diff: test/codegen/expect/destructuring.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/codegen/expect/closure.js ('k') | test/codegen/expect/destructuring.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/codegen/expect/destructuring.js
diff --git a/test/codegen/expect/destructuring.js b/test/codegen/expect/destructuring.js
new file mode 100644
index 0000000000000000000000000000000000000000..7049614851187f60565dafd556bd85c58a9d5676
--- /dev/null
+++ b/test/codegen/expect/destructuring.js
@@ -0,0 +1,39 @@
+dart_library.library('destructuring', null, /* Imports */[
+ 'dart/_runtime',
+ 'dart/core'
+], /* Lazy imports */[
+], function(exports, dart, core) {
+ 'use strict';
+ let dartx = dart.dartx;
+ function f(a, b, c = 1) {
+ f(a, b, c);
+ }
+ dart.fn(f, dart.dynamic, [core.int, dart.dynamic], [dart.dynamic]);
+ function g(a, b, {c = 1} = {}) {
+ f(a, b, c);
+ }
+ dart.fn(g, dart.dynamic, [core.int, dart.dynamic], {c: dart.dynamic});
+ function invalid_names1(let$, func, arguments$) {
+ f(let$, func, arguments$);
+ }
+ dart.fn(invalid_names1, dart.dynamic, [core.int, dart.dynamic, dart.dynamic]);
+ function invalid_names2(let$ = null, func = 1, arguments$ = null) {
+ f(let$, func, arguments$);
+ }
+ dart.fn(invalid_names2, dart.dynamic, [], [core.int, dart.dynamic, dart.dynamic]);
+ function invalid_names3({["let"]: let$ = null, ["function"]: func = null, ["arguments"]: arguments$ = 2} = {}) {
+ f(let$, func, arguments$);
+ }
+ dart.fn(invalid_names3, dart.dynamic, [], {let: core.int, function: dart.dynamic, arguments: dart.dynamic});
+ function names_clashing_with_object_props({constructor = null, valueOf = null, hasOwnProperty = 2} = Object.create(null)) {
+ f(constructor, valueOf, hasOwnProperty);
+ }
+ dart.fn(names_clashing_with_object_props, dart.dynamic, [], {constructor: core.int, valueOf: dart.dynamic, hasOwnProperty: dart.dynamic});
+ // Exports:
+ exports.f = f;
+ exports.g = g;
+ exports.invalid_names1 = invalid_names1;
+ exports.invalid_names2 = invalid_names2;
+ exports.invalid_names3 = invalid_names3;
+ exports.names_clashing_with_object_props = names_clashing_with_object_props;
+});
« no previous file with comments | « test/codegen/expect/closure.js ('k') | test/codegen/expect/destructuring.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698