Closed reynir closed 2 years ago
In other words, the compiler does not check whether the arguments to cont() etc. are assignable. Here is an example:
// Source async(stuff, cont(err, result+4)); bar(result+1); // Output var err; async(stuff, function () { err = arguments[0]; (result + 4) = arguments[1]; bar(result + 1); }); /* Generated by Continuation.js v0.1.3 */
This is always an error. You cannot assign to (result + 4). Actually, you can also write 4 instead result + 4 and you will get 4 = arguments[1];!
4
result + 4
4 = arguments[1];
In other words, the compiler does not check whether the arguments to cont() etc. are assignable. Here is an example:
This is always an error. You cannot assign to (result + 4). Actually, you can also write
4
insteadresult + 4
and you will get4 = arguments[1];
!