1
0
Fork 0
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:
gfxmonk 2010-03-14 12:58:16 +11:00
parent 89dfa1fd7a
commit 3c3e7f666b

14
test/test_break_2.coffee Normal file
View 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