Closed Bug 411041 Opened 18 years ago Closed 17 years ago

labels prevent otherwise valid let declarations

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
minor

Tracking

()

RESOLVED INVALID

People

(Reporter: mrbkap, Unassigned)

References

Details

(Keywords: regression)

js> function(){ foo: let k; } typein:1: SyntaxError: let declaration not directly within block: typein:1: function(){ foo: let k; } typein:1: .................^ I'd expect that to compile. It doesn't because labels push a statement onto the statement stack, I should have caught this during review, sorry.
What is the purpose of that label? It can't be used by break or continue. /be
It's useless. I doubt this would bite any real code, I'm just pointing it out for consistency's sake.
Severity: normal → minor
Invalid per ES4 as proposed and likely to be accepted. /be
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.