Skip to content
Snippets Groups Projects
Commit 142560b7 authored by Mick Jordan's avatar Mick Jordan
Browse files

Return does not overide visibility setting

parent 27d88ade
Branches
No related tags found
No related merge requests found
......@@ -45,7 +45,10 @@ public abstract class Return extends RBuiltinNode {
@Specialization
protected Object returnFunction(Object value) {
controlVisibility();
/*
* Do not call controlVisibility, otherwise return(invisible(e)) will not work. Whatever the
* visibility state at this point is preserved.
*/
throw new ReturnException(value);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment