Generator yielded assignments leave stray code.
Closed this issue · 1 comments
kkirby commented
Hello.
My title is pretty awful, I realize. But I wasn't sure how to succinctly describe this issue.
Anyways, if you have a generator with a yielded assignment to an object, the result will leave stray code.
If you have this:
let setup = promise! #()*
@asdf := yield something()
doSomethingElse()
The result will have something like this:
case 1:
_this.asdf = _received;
_this.asdf;
++_state;
return { done: true, value: doSomethingElse() };
If you see, there is a stray _this.asdf
. If you leave out the doSomethingElse()
call, then as expected, the stray code will be returned as the value.
This isn't a huge bug, but it spits out a lot of warnings when using Google Closure Compiler.
kkirby commented
This is fixed in my community repo