Function Invocation on a Number Literal Surrounded by Parentheses generates illegal JavaScript #1385

Closed
STRd6 opened this Issue May 23, 2011 · 4 comments

Comments

Projects
None yet
3 participants
@STRd6

STRd6 commented May 23, 2011

(0).abs() # => 0.abs() // SyntaxError: Unexpected token ILLEGAL
0.abs() # => (0).abs() // Correct

This was working in 0.9.4 and is now broken for me in 1.1.1

@michaelficarra

This comment has been minimized.

Show comment Hide comment
@michaelficarra

michaelficarra May 23, 2011

Collaborator

Oh, nice catch. Can't believe we didn't have a test case for this. Confirmed, marking as bug.

Collaborator

michaelficarra commented May 23, 2011

Oh, nice catch. Can't believe we didn't have a test case for this. Confirmed, marking as bug.

@michaelficarra

This comment has been minimized.

Show comment Hide comment
@michaelficarra

michaelficarra May 23, 2011

Collaborator

@satyr: A quick git bisect turns up 341de42 as the commit that broke this, way back in October 2010.

Collaborator

michaelficarra commented May 23, 2011

@satyr: A quick git bisect turns up 341de42 as the commit that broke this, way back in October 2010.

@satyr

This comment has been minimized.

Show comment Hide comment
@satyr

satyr May 23, 2011

Collaborator

341de42 as the commit that broke this

Which revealed a flaw in Value::compileNode.

Collaborator

satyr commented May 23, 2011

341de42 as the commit that broke this

Which revealed a flaw in Value::compileNode.

@michaelficarra

This comment has been minimized.

Show comment Hide comment
@michaelficarra

michaelficarra May 24, 2011

Collaborator

@STRd6: fixed by the above commit

Collaborator

michaelficarra commented May 24, 2011

@STRd6: fixed by the above commit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment