Skip to content

Commit

Permalink
Add failing test per jashkenas#4406
Browse files Browse the repository at this point in the history
  • Loading branch information
GeoffreyBooth committed Jan 21, 2017
1 parent 9e13100 commit ed6d9c6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/functions.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -341,3 +341,9 @@ test "#1038 Optimize trailing return statements", ->
foo()
return
""")

test "#4406 Destructured parameter default evaluation order", ->
current = 0
next = -> ++current
foo = ({ a = next() }, b = next()) -> [ a, b ]
arrayEq foo({}), [1, 2]

0 comments on commit ed6d9c6

Please sign in to comment.