swc/tests/tsc-references/es6/destructuring/destructuringReassignsRightHandSide/input.ts/es5.1.normal/output.js

12 lines
229 B
JavaScript

// @target: es5
var foo = {
foo: 1,
bar: 2
};
var bar;
var ref;
// reassignment in destructuring pattern
(ref = foo, foo = ref.foo, bar = ref.bar, ref);
// reassignment in subsequent var
var foo = foo.foo, baz = foo.baz;