mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
checker: update assoc type
This commit is contained in:
@ -594,11 +594,12 @@ pub:
|
|||||||
|
|
||||||
pub struct Assoc {
|
pub struct Assoc {
|
||||||
pub:
|
pub:
|
||||||
typ table.Type
|
|
||||||
var_name string
|
var_name string
|
||||||
fields []string
|
fields []string
|
||||||
exprs []Expr
|
exprs []Expr
|
||||||
pos token.Position
|
pos token.Position
|
||||||
|
mut:
|
||||||
|
typ table.Type
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct SizeOf {
|
pub struct SizeOf {
|
||||||
|
@ -649,6 +649,7 @@ pub fn (c mut Checker) expr(node ast.Expr) table.Type {
|
|||||||
for i, _ in it.fields {
|
for i, _ in it.fields {
|
||||||
c.expr(it.exprs[i])
|
c.expr(it.exprs[i])
|
||||||
}
|
}
|
||||||
|
it.typ = var.typ
|
||||||
return var.typ
|
return var.typ
|
||||||
}
|
}
|
||||||
ast.BoolLiteral {
|
ast.BoolLiteral {
|
||||||
|
Reference in New Issue
Block a user