Skip to content

Commit

Permalink
add destructuring test #868
Browse files Browse the repository at this point in the history
  • Loading branch information
gkz committed May 15, 2016
1 parent 2f7876b commit bf842ed
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/function.ls
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,15 @@ eq 1, new (class then (@do) -> eq @do, $do)(1).do
eq c, 456
) {a: [123], c: 456}

y = false
((a, ...[x]:b, c) ->
eq 1, a
deep-equal [2, 3], b
eq 4, c
eq 2, x
y := true
) 1, 2, 3, 4
ok y

# Parameter default values
obj = f: (q = 123, @p = 456) -> q
Expand Down

0 comments on commit bf842ed

Please sign in to comment.