mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
Added a (failing) test that reproduces #723.
This commit is contained in:
parent
b2313beaf4
commit
8f96f5f20f
1 changed files with 13 additions and 0 deletions
|
@ -83,3 +83,16 @@ obj = {
|
|||
}
|
||||
|
||||
ok obj.func() is '101!'
|
||||
|
||||
|
||||
# Should be able to use "@properties" within the switch cases.
|
||||
obj = {
|
||||
num: 101
|
||||
func: (yesOrNo) ->
|
||||
result = switch yesOrNo
|
||||
when yes then @num
|
||||
else 'other'
|
||||
result
|
||||
}
|
||||
|
||||
ok obj.func(yes) is 101
|
||||
|
|
Loading…
Reference in a new issue