Issue originally reported by @danez in babel/babylon#78
According to the spec when defining multiple variables with the same name, the parser should throw and SyntaxError when using let or const:
let foo, foo;
or
let foo; let foo;
From 13.2.1.1:
It is a Syntax Error if the BoundNames of BindingList contains any duplicate entries.
V8 trows an error for let and const, but not vor var.
According to the spec when defining multiple variables with the same name, the parser should throw and SyntaxError when using
letorconst:let foo, foo;or
let foo; let foo;From 13.2.1.1:
V8 trows an error for
letandconst, but not vorvar.