Closed neverfox closed 11 years ago
Maybe I'm missing something about how CS works but if I write:
await myMethod item, defer err, result if err? ...
then if err? gets compiled as if (typeof err !== "undefined" && err !== null)
if err?
if (typeof err !== "undefined" && err !== null)
But if I write:
await for item in items myMethod item, defer err, result if err? ...
then if err? gets compiled as if (err != null). Is this expected behavior?
if (err != null)
So this seems to be a CS thing that detects if err ever had a value assigned, which is ambiguous in the first case and not in the second, given the way ICS compiles the loop with an err = arguments[0].
err
err = arguments[0]
Maybe I'm missing something about how CS works but if I write:
then
if err?
gets compiled asif (typeof err !== "undefined" && err !== null)
But if I write:
then
if err?
gets compiled asif (err != null)
. Is this expected behavior?