mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
added another "invalid break" example, with code not on the top-level
This commit is contained in:
parent
89dfa1fd7a
commit
3c3e7f666b
1 changed files with 14 additions and 0 deletions
14
test/test_break_2.coffee
Normal file
14
test/test_break_2.coffee
Normal file
|
@ -0,0 +1,14 @@
|
|||
some_func: (input) ->
|
||||
takes_lambda: (l) -> null
|
||||
for i in [1,2]
|
||||
arbitraty_var: takes_lambda(->)
|
||||
if input == 1
|
||||
return 1
|
||||
else
|
||||
break
|
||||
|
||||
return 2
|
||||
|
||||
ok some_func(1) is 1
|
||||
ok some_func(2) is 2
|
||||
|
Loading…
Add table
Reference in a new issue