tflag_empty = 1 << 7,
tflag_ftmpl = 1 << 8,
tflag_ntmpl = 1 << 9, // do NOT need types
- tflag_ctmpl = 1 << 10, // child template
- tflag_udef = 1 << 11,
- tflag_cdef = 1 << 12,
- tflag_struct = 1 << 13,
- tflag_ctor = 1 << 14,
- tflag_dtor = 1 << 15,
- tflag_tmpl = 1 << 16,
- tflag_typedef = 1 << 17,
+ tflag_udef = 1 << 10,
+ tflag_cdef = 1 << 11,
+ tflag_struct = 1 << 12,
+ tflag_ctor = 1 << 13,
+ tflag_dtor = 1 << 14,
+ tflag_tmpl = 1 << 15,
+ tflag_typedef = 1 << 16,
} __attribute__((packed));
struct Type_ {
if(td->array)
set_tflag(t, tflag_typedef);
if(ck.tmpl)
- set_tflag(t, tflag_tmpl);
+ set_tflag(t, tflag_tmpl | tflag_ntmpl);
else
gwi_type_flag(t);
return type_finish(gwi, t);
if((info->ret = cdef->base.type)) {
info->ret->info->cdef = cdef;
set_tflag(info->ret, tflag_cdef);
- set_tflag(info->ret, tflag_ctmpl);
} else
free_class_def(env->gwion->mp, cdef);
return ret;
ANN Type _scan_type(const Env env, const Type t, Type_Decl* td) {
if(tflag(t, tflag_tmpl) && isa(t, env->gwion->type[et_function]) < 0) {
- if(tflag(t, tflag_ctmpl) || (tflag(t, tflag_ntmpl) && !td->types))
+ if(tflag(t, tflag_ntmpl) && !td->types)
return t;
struct TemplateScan ts = { .t=t, .td=td };
struct Op_Import opi = { .op=insert_symbol("@scan"), .lhs=t, .data=(uintptr_t)&ts, .pos=td->pos, .op_type=op_scan };
13 => var B B;
}
}
-var Parent.C:[int, int] c;
+var Parent:[int].C:[int] c;
<<< c.a >>>;