mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
v2: update checker. missing from previous commits
This commit is contained in:
parent
ee6a8a41f5
commit
6de44db4eb
@ -416,9 +416,10 @@ fn (c mut Checker) stmt(node ast.Stmt) {
|
||||
for i, expr in it.exprs {
|
||||
mut field := it.fields[i]
|
||||
typ := c.expr(expr)
|
||||
mut xconst := c.table.consts[field.name]
|
||||
xconst.typ = typ
|
||||
c.table.consts[field.name] = xconst
|
||||
c.table.register_const(table.Var{
|
||||
name: field.name
|
||||
typ: typ
|
||||
})
|
||||
field.typ = typ
|
||||
it.fields[i] = field
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user