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:

committed by
Alexander Medvednikov

parent
dae4c4b83f
commit
4f0f99e663
@ -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
|
||||
|
Reference in New Issue
Block a user