mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-01-25 22:57:55 -05:00
Merge branch 'power-operator' of git://github.com/charliesome/coffee-script into more-math-operators
Conflicts: src/nodes.coffee test/operators.coffee
This commit is contained in:
@@ -296,3 +296,12 @@ test "#2567: Optimization of negated existential produces correct result", ->
|
||||
test "#2508: Existential access of the prototype", ->
|
||||
eq NonExistent?::nothing, undefined
|
||||
ok Object?::toString
|
||||
|
||||
test "power operator", ->
|
||||
eq 27, 3 ** 3
|
||||
|
||||
test "power operator has higher precedence than other maths operators", ->
|
||||
eq 55, 1 + 3 ** 3 * 2
|
||||
|
||||
test "power operator is right associative", ->
|
||||
eq 2, 2 ** 1 ** 3
|
||||
Reference in New Issue
Block a user