fixing If/else-to-ternary with instanceof as an unparenthesized condition. JS operator precedence.

This commit is contained in:
Jeremy Ashkenas
2010-07-23 20:44:56 -07:00
parent 24a5adc898
commit de9fb7777b
5 changed files with 21 additions and 9 deletions

View File

@@ -67,3 +67,10 @@ func: ->
return (if false then callback())
ok func() is null
# If-to-ternary with instanceof requires parentheses (no comment).
if {} instanceof Object
ok yes
else
ok no