gkz / LiveScript

LiveScript is a language which compiles to JavaScript. It has a straightforward mapping to JavaScript and allows you to write expressive code devoid of repetitive boilerplate. While LiveScript adds many features to assist in functional style programming, it also has many improvements for object oriented and imperative programming.
http://livescript.net
MIT License
2.32k stars 155 forks source link

Callable binary logic getting confused with methods on this #251

Open apaleslimghost opened 11 years ago

apaleslimghost commented 11 years ago
livescript -cb> @a! or c <| b
this === b || c(b);

I'm guessing it should be this.a()(c) || c(b)?

apaleslimghost commented 11 years ago

@a or c <| b compiles exactly the same.

vendethiel commented 11 years ago

Not really getting confused, <| just has lower precedence, meaning that your code is read (@a! or c) b. a! is probably skipped because of this