Skip to content
Snippets Groups Projects
Commit 31bd97ca authored by Adam Welc's avatar Adam Welc
Browse files

A fix to promise refactoring removing a problem in compiled code.

parent 1908a651
Branches
No related tags found
No related merge requests found
......@@ -158,8 +158,14 @@ public class PromiseHelperNode extends RBaseNode {
} else {
obj = generateValueEager(frame, state, (EagerPromise) promise);
}
setValue(obj, promise);
return obj;
if (isEvaluated(promise)) {
// TODO: this only happens if compilation is in play and, as such, is difficult to track
// why (there is no obvious call path...)
return promise.getValue();
} else {
setValue(obj, promise);
return obj;
}
}
private Object generateValueDefault(VirtualFrame frame, PromiseState state, RPromise promise) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment