Issue #670. 'THIS' tokens should trigger an implicit call.

This commit is contained in:
Jeremy Ashkenas
2010-09-08 20:15:16 -04:00
parent 62bf0a2bc9
commit 70cfd54ad4
3 changed files with 11 additions and 2 deletions

View File

@@ -220,3 +220,12 @@ obj =
ok obj.func(101, 102, 103, 104) is undefined
ok obj.param is 101
ok obj.rest.join(' ') is '102 103 104'
# `@` and `this` should both be able to invoke a method.
func = (arg) -> ok arg is true
func.withAt = -> @ true
func.withThis = -> this true
func.withAt()
func.withThis()