Commit 02ad5987 authored by Juergen Nickelsen's avatar Juergen Nickelsen
Browse files

enforce immutability also for the function cell

parent b6ce5ff7
......@@ -203,6 +203,10 @@ obp_t bf_fset(obp_t args, obp_t out_port, int level)
obp_t sym = CAR(args);
obp_t form = CADR(args);
if (sym->immutable) {
ERROR(out_port, ERR_IMMUTBL, sym,
"symbol's function cell may not be modified");
obp_t func = make_function(THE_STRINGS(AS(sym, SYMBOL)->name),
form, out_port);
Supports Markdown
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