jashkenas/coffeescript — pull request #3676 by Artazor (2014-10-12 17:14:02+00:00)
Title: Added failing test case for the `yield` precedence

I've added a test case for the `yield` precedence. Discussed in https://github.com/jashkenas/coffeescript/issues/3674

```coffeescript
test "symbolic operators has precedence over the `yield`", ->

symbolic = '+ - * / << >> & | || && ** ^ \\ or and'.split ' '
compound = ("#{op}=" for op in symbolic)
relations = '< > == != <= >= is isnt'.split ' '

operators = []
operators.push symbolic...
operators.push compound...
operators.push relations...

allOf = (gen) -> ref.value until (ref = gen.next()).done

values = [0, 1, 2, 3]

for op in operators
generator = CoffeeScript.eval "(arr) -> yield i #{op} 2 for i in arr"
transform = CoffeeScript.eval "(i) -> i #{op} 2"
expected = values.map transform
actual = allOf generator values
arrayEq actual, expected
```