# test.coffee
f = (s, e) -> s 'you succeeded'
rv = new iced.Rendezvous
f rv.defer msg, rv.defer err
await rv.wait defer which
console.log "got back #{which}"
console.log "msg: #{msg}, err: #{err}"
Upon running with iced test.coffee, it throws:
ReferenceError: Invalid left-hand side in assignment
at C:\Users\works\kk\k.coffee:19:11
at ret (C:\Users\AppData\Roaming\npm\node_modules\iced-coffee-script\node_modules\iced-runtime\lib\runtime.js:21:16)
at f (C:\Users\works\kk\k.coffee:1:15)
at Object.<anonymous> (C:\Users\works\kk\k.coffee:4:1)
at Object.<anonymous> (C:\Users\works\kk\k.coffee:1:1)
at Module._compile (module.js:456:26)
Looking at the compiled js, it has the following snippets, which is obviously wrong (line marked with "XXXX"). However if I change in test.coffee the way how I call the f() function to: f (rv.defer msg), (rv.defer err), it works.
With the below sample:
Upon running with
iced test.coffee
, it throws:Looking at the compiled js, it has the following snippets, which is obviously wrong (line marked with "XXXX"). However if I change in
test.coffee
the way how I call thef()
function to:f (rv.defer msg), (rv.defer err)
, it works.