Add tests for implicit calls with implicit object
This commit is contained in:
parent
1e62781759
commit
4e6b6678f7
|
@ -674,3 +674,24 @@ test "Non-callable literals shouldn't compile", ->
|
|||
cantCompile '[2..9](2)'
|
||||
cantCompile '[1..10][2..9] 2'
|
||||
cantCompile '[1..10][2..9](2)'
|
||||
|
||||
test 'implicit invocation with implicit object literal', ->
|
||||
f = (obj) -> eq 1, obj.a
|
||||
|
||||
f
|
||||
a: 1
|
||||
obj =
|
||||
if f
|
||||
a: 2
|
||||
else
|
||||
a: 1
|
||||
eq 2, obj.a
|
||||
|
||||
f
|
||||
"a": 1
|
||||
obj =
|
||||
if f
|
||||
"a": 2
|
||||
else
|
||||
"a": 1
|
||||
eq 2, obj.a
|
||||
|
|
Loading…
Reference in New Issue