mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-18 11:31:20 -05:00
ensure that functions are only called once, when chaining comparators
This commit is contained in:
11
test/fixtures/execution/test_operations.coffee
vendored
11
test/fixtures/execution/test_operations.coffee
vendored
@@ -6,4 +6,13 @@ print(true is not false is true is not false)
|
||||
|
||||
print(10 < 20 > 10)
|
||||
|
||||
print(50 > 10 > 5 is parseInt('5', 10))
|
||||
print(50 > 10 > 5 is parseInt('5', 10))
|
||||
|
||||
|
||||
# Make sure that each argument is only evaluated once, even if used
|
||||
# more than once.
|
||||
|
||||
i: 0
|
||||
func: => i++
|
||||
|
||||
print(1 > func() < 1)
|
||||
|
||||
Reference in New Issue
Block a user