From 9978fb3e2c500d404691c71cf993c74838857ccd Mon Sep 17 00:00:00 2001 From: Joe Conigliaro Date: Sun, 1 Mar 2020 21:45:44 +1100 Subject: [PATCH] v2: fix map_init return type in checker --- vlib/v/checker/checker.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/v/checker/checker.v b/vlib/v/checker/checker.v index f0d81195b3..a21effe139 100644 --- a/vlib/v/checker/checker.v +++ b/vlib/v/checker/checker.v @@ -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) } } - 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