checker: update assoc type
parent
a456c21249
commit
6c56528cd7
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue