diff options
Diffstat (limited to 'struct.c')
-rw-r--r-- | struct.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -1177,19 +1177,22 @@ static val static_slot_ens_rec(val stype, val sym, val newval, val static_slot_ensure(val stype, val sym, val newval, val no_error_p) { val self = lit("static-slot-ensure"); + val res; if (!bindable(sym)) uw_throwf(error_s, lit("~a: ~s isn't a valid slot name"), self, sym, nao); + no_error_p = default_null_arg(no_error_p); + res = static_slot_ens_rec(stype, sym, newval, no_error_p, self, 0); + if (trace_loaded) { struct struct_type *st = stype_handle(&stype, self); val name = list(meth_s, st->name, sym, nao); trace_check(name); } - no_error_p = default_null_arg(no_error_p); - return static_slot_ens_rec(stype, sym, newval, no_error_p, self, 0); + return res; } val static_slot_home(val stype, val sym) |