Commit 813d00ec authored by Radford Neal's avatar Radford Neal

set LASTSYMENV after creating new var in unhashed env

parent 427dbe16
......@@ -2,3 +2,4 @@ Improvements to variable lookup.
Sets LASTSYMENV for a newly-created argument, unless it is missing.
Also sets LASTSYMENV when a new variable is created in an unhashed environment.
......@@ -1593,6 +1593,8 @@ int set_var_in_frame (SEXP symbol, SEXP value, SEXP rho, int create, int incdec)
if (HASHTAB(rho) == R_NilValue) {
new = cons_with_tag (value, FRAME(rho), symbol);
SET_FRAME(rho, new);
LASTSYMENV(symbol) = SEXP32_FROM_SEXP(rho);
LASTSYMBINDING(symbol) = new;
}
else {
SEXP table = HASHTAB(rho);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment