[parenscript-devel] Bug: RETURN-FROM inside a lambda doesn't return anything
Daniel Gackle
danielgackle at gmail.com
Mon Aug 29 17:56:10 UTC 2011
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;
};
};
};
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/parenscript-devel/attachments/20110829/7d12656b/attachment.html>
More information about the parenscript-devel
mailing list