summaryrefslogtreecommitdiff
path: root/parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/parse.c b/parse.c
index 2c6fcf7..9a636b4 100644
--- a/parse.c
+++ b/parse.c
@@ -603,8 +603,7 @@ static bool parse_type(Parser *p, Type *type) {
Type *ftype = field_decl.type.kind == TYPE_TUPLE ? &field_decl.type.tuple[idx] : &field_decl.type;
Field *f = parser_arr_add(p, &type->struc->fields);
f->name = *fident;
- f->type = parser_malloc(p, sizeof *f->type);
- *f->type = *ftype;
+ f->type = *ftype;
++idx;
}
}