1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

parser: fix mutability with chained fields

This commit is contained in:
kawa-yoiko
2019-08-31 01:19:06 +08:00
committed by Alexander Medvednikov
parent dae4c4b83f
commit 4f0f99e663
7 changed files with 110 additions and 23 deletions

View File

@ -27,6 +27,7 @@ mut:
struct GenTable {
fn_name string
mut:
types []string
}
@ -423,6 +424,7 @@ fn (t mut Type) add_field(name, typ string, is_mut bool, attr string, access_mod
typ: typ
is_mut: is_mut
attr: attr
parent_fn: t.name // Name of the parent type
access_mod: access_mod
}
t.fields << v