Open saatchiCEO opened 11 years ago
Good point, seems like this example is running afoul of a compile-time check that's inherited from CS. For now I'd recommend the workaround of assigning bar = ""
before the await
. Thanks for your feedback.
Perhaps, something like the behavior below can be implemented?
await foo(defer(bar=x)); -> translates into -> await foo(defer(bar)); bar = bar || x;
I'm running into this same unfortunate behavior. +1
same issue :+1: simple example
await doStuff defer err, result
err ?= new Error '...' unless result?
Seems like the class Defer
(around here ?) could use some o.scope.add
, or am I missing something?
Only compileRoot
, class Code
should creates new scopes (and class Class
through func.makeScope
), so I don't think this should be an issue, but I might be missing something?
The following code can't be translated:
but this one can:
Is that OK?