mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-18 11:31:20 -05:00
Added function call's flexibility with splats to array literals, factoring out splat compiling, and adjusted tests
This commit is contained in:
@@ -58,4 +58,21 @@ obj: {
|
||||
@accessor(args...)
|
||||
}
|
||||
|
||||
ok obj.getNames() is 'bob jane ted'
|
||||
ok obj.getNames() is 'bob jane ted'
|
||||
|
||||
|
||||
crowd: [
|
||||
contenders...
|
||||
"Mighty Mouse"
|
||||
]
|
||||
|
||||
bests: [
|
||||
"Mighty Mouse"
|
||||
contenders[0..3]...
|
||||
]
|
||||
|
||||
ok crowd[0] is contenders[0]
|
||||
ok crowd[10] is "Mighty Mouse"
|
||||
|
||||
ok bests[1] is contenders[0]
|
||||
ok bests[4] is contenders[3]
|
||||
Reference in New Issue
Block a user