I pushed a very simple patch for this bug. It still isn't correct, because the resulting code generates a warning, but it's a lot closer to correct than not returning a return value at all. I wasn't sure how to make a correct fix, but I badly need this return value, and this can serve as an interim compromise. On a positive note, this shows how valuable the feature is! (Vladimir, when you get to this, feel free to undo my oversimplified change.)
Daniel On Mon, Aug 29, 2011 at 11:56 AM, Daniel Gackle <[email protected]>wrote: > I thought this was working at some point, but it doesn't seem to now. FOO() > returns undefined in JS, when it should return 123: > > (defun bar (fn) > (funcall fn)) > > (defun foo () > (bar (lambda () (return-from foo 123)))) > > It seems the value stored under the name "ps-return-value" isn't actually > returned: > > function foo() { > try { > return bar(function () { > throw { 'ps-block-tag' : 'foo', 'ps-return-value' : 123 }; > }); > } catch (err) { > if (err && 'foo' === err['ps-block-tag']) { > err['ps-return-value']; > } else { > throw err; > }; > }; > }; >
_______________________________________________ parenscript-devel mailing list [email protected] http://lists.common-lisp.net/cgi-bin/mailman/listinfo/parenscript-devel
