checker: update assoc type

pull/4072/head
Joe Conigliaro 2020-03-19 19:52:33 +11:00
parent a456c21249
commit 6c56528cd7
2 changed files with 3 additions and 1 deletions

View File

@ -594,11 +594,12 @@ pub:
pub struct Assoc {
pub:
typ table.Type
var_name string
fields []string
exprs []Expr
pos token.Position
mut:
typ table.Type
}
pub struct SizeOf {

View File

@ -649,6 +649,7 @@ pub fn (c mut Checker) expr(node ast.Expr) table.Type {
for i, _ in it.fields {
c.expr(it.exprs[i])
}
it.typ = var.typ
return var.typ
}
ast.BoolLiteral {