google / traceur-compiler

Traceur is a JavaScript.next-to-JavaScript-of-today compiler
Apache License 2.0
8.17k stars 581 forks source link

Make Traceur work with V8 block bindings #1941

Closed arv closed 9 years ago

arv commented 9 years ago

V8 does not support let/const inside switch statements. It requires that you add an extra block (which is sane anyway).

This was tested with adding --block-binding=parse to the Makefile.

arv commented 9 years ago

@johnjbarton PTAL

johnjbarton commented 9 years ago

LGTM. We'll break this if we don't adopt the style.

arv commented 9 years ago

It is really a V8 bug but I expect linters to disallow block bindings here. We have historically been opposed to making traceur add lint checks.