satyr / coco

Unfancy CoffeeScript
http://satyr.github.com/coco/
MIT License
497 stars 48 forks source link

Instanceof and that #148

Closed apaleslimghost closed 12 years ago

apaleslimghost commented 12 years ago

instanceof has higher precedence than assignment, but if a instanceof b then that compiles to if(that = a instanceof b) {that;}. In my mind, I'd prefer that to point to a, rather than the result of the instanceof. Is the current compilation correct behaviour?

Edit: to me, it should be consistent with the existing if a? then thatif((that = a) != null){that;}.

satyr commented 12 years ago

Postfix-? is currently the only specialcase for that because: