v2: fix map_init return type in checker

pull/3890/head
Joe Conigliaro 2020-03-01 21:45:44 +11:00
parent 00dcaf0e04
commit 9978fb3e2c
1 changed files with 1 additions and 1 deletions

View File

@ -812,7 +812,7 @@ pub fn (c mut Checker) map_init(node ast.MapInit) table.Type {
c.error('map init: cannot use `$val_type_sym.name` as `$val0_type_sym` for map value', node.pos) c.error('map init: cannot use `$val_type_sym.name` as `$val0_type_sym` for map value', node.pos)
} }
} }
return c.table.find_or_register_map(key0_type, val0_type) return table.new_type(c.table.find_or_register_map(key0_type, val0_type))
} }
// TODO: remove once all exprs/stmts are handled // TODO: remove once all exprs/stmts are handled