[qfcc] Handle field expressions in compute_type

I'm not entirely sure how that got in there (I didn't check the
backtrace, but probably in @construct (before I realized I needed to add
@construct)).
This commit is contained in:
Bill Currie 2025-01-13 19:50:23 +09:00
parent 9dca372643
commit cb20153da5

View file

@ -1035,6 +1035,11 @@ compute_type (const expr_t *arg, comp_ctx_t *ctx)
C (OP_CALL_B, ctx->funcs[tf_gentype], nullptr, res); C (OP_CALL_B, ctx->funcs[tf_gentype], nullptr, res);
return res; return res;
} }
if (arg->type == ex_field) {
// type attribute
const expr_t *args[2] = {arg->field.object, arg->field.member};
return compute_attribute (2, args, ctx);
}
if (arg->type != ex_type) { if (arg->type != ex_type) {
internal_error (arg, "not a type expression"); internal_error (arg, "not a type expression");
} }