if (!vflag(f->value_ref, vflag_member))
instr->m_val2 = -SZ_INT;
else {
- const Instr instr = emit_add_instr(emit, RegMove);
- instr->m_val = SZ_INT;
+ if(member->is_call){
+ const Instr instr = emit_add_instr(emit, RegMove);
+ instr->m_val = SZ_INT;
+ } else {
+ const Instr instr = (Instr)vector_back(&emit->code->instr);
+ instr->opcode = eRegPushImm;
+ instr->m_val = (m_uint)f->code;
+ }
}
}
return;
Type_List call = tmpl->call;
do {
if (!call) break;
- const Type t = known_type(env, call->td);
+ const Type t = call->td ? known_type(env, call->td) : NULL;
if (!t) return GW_OK;
nspc_add_type(nspc, list->xid, t);
call = call->next;