emit_add_instr(emit, RegPushMem);
else if(prim->d.var == insert_symbol("me"))
emit_add_instr(emit, RegPushMe);
- else if(prim->d.var == insert_symbol("now") && exp_self(prim)->type == t_now)
- emit_add_instr(emit, RegPushNow);// 'now' is not reserved for ... now ;-)
+ else if(prim->d.var == insert_symbol("now"))
+ emit_add_instr(emit, RegPushNow);
else if(prim->d.var == insert_symbol("maybe"))
emit_add_instr(emit, RegPushMaybe);
else if(prim->d.var == insert_symbol("__func__")) {
Type t = decl->type;
const Var_Decl var = list->self;
const Value former = nspc_lookup_value0(env->curr, var->xid);
- CHECK_BB(isres(env, var->xid, exp_self(decl)->pos))
+ if(!GET_FLAG(decl->td, builtin))
+ CHECK_BB(isres(env, var->xid, exp_self(decl)->pos))
if(former && !decl->td->exp &&
(!env->class_def || !(GET_FLAG(env->class_def, template) || GET_FLAG(env->class_def, scan1))))
ERR_B(var->pos, "variable %s has already been defined in the same scope...",
ANN m_bool isres(const Env env, const Symbol xid, const loc_t pos) {
const m_str s = s_name(xid);
- if(!strcmp(s, "this") || !strcmp(s, "vararg") || !name2op(s))
+ if(!strcmp(s, "this") ||
+ !strcmp(s, "me") ||
+ !strcmp(s, "now") ||
+ !strcmp(s, "maybe") ||
+ !strcmp(s, "vararg") ||
+ !strcmp(s, "__func__") ||
+ !name2op(s))
ERR_B(pos, "%s is reserved.", s_name(xid));
return GW_OK;
}