Justin Ridgewell 8cd4a62c02 Transform do-expressions on exit (#5694)
* Transform do-expressions on exit

This allows other transforms (notably, block scoping) to do their magic
first, possibly saving closures.

Also fixes a bug with declaring duplicate bindings (de-opts now).

* Use strict in exec test

* lint
2017-05-19 16:58:15 -04:00

11 lines
93 B
JavaScript

"use strict";
let a = 1;
(do {
let a = 2;
assert.equal(a, 2);
});
assert.equal(a, 1);