mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-04-11 03:00:13 -04:00
Enchancing pattern matching with @vars ... issue #721
This commit is contained in:
@@ -249,3 +249,14 @@ ok b is 100
|
||||
eq '\\`', `
|
||||
"\\\`"
|
||||
`
|
||||
|
||||
|
||||
# Shorthand objects with property references.
|
||||
obj =
|
||||
one: 1
|
||||
two: 2
|
||||
func: -> {@one, @two}
|
||||
|
||||
result = obj.func()
|
||||
ok result.one is 1
|
||||
ok result.two is 2
|
||||
|
||||
Reference in New Issue
Block a user