From 6e89ad34014d62dc12bf360550a778d0c3ebd242 Mon Sep 17 00:00:00 2001 From: Michael Ficarra Date: Wed, 13 Oct 2010 12:12:24 -0400 Subject: [PATCH] test case for #768 --- test/test_operations.coffee | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/test_operations.coffee b/test/test_operations.coffee index f77c24d3..0ba5cd64 100644 --- a/test/test_operations.coffee +++ b/test/test_operations.coffee @@ -145,3 +145,10 @@ ok new Number not instanceof String #737: `in` should have higher precedence than logical operators eq 1, 1 in [1] and 1 + +#768: `in` should preserve evaluation order +share = 0 +a = -> share++ if share is 0 +b = -> share++ if share is 1 +c = -> share++ if share is 2 +ok a() not in [b(),c()] and share is 3