From 6de44db4ebf0e1ebdabfb54540683240761db49d Mon Sep 17 00:00:00 2001 From: Joe Conigliaro Date: Thu, 5 Mar 2020 22:30:16 +1100 Subject: [PATCH] v2: update checker. missing from previous commits --- vlib/v/checker/checker.v | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/vlib/v/checker/checker.v b/vlib/v/checker/checker.v index cde13f773a..bba837353b 100644 --- a/vlib/v/checker/checker.v +++ b/vlib/v/checker/checker.v @@ -416,9 +416,10 @@ fn (c mut Checker) stmt(node ast.Stmt) { for i, expr in it.exprs { mut field := it.fields[i] typ := c.expr(expr) - mut xconst := c.table.consts[field.name] - xconst.typ = typ - c.table.consts[field.name] = xconst + c.table.register_const(table.Var{ + name: field.name + typ: typ + }) field.typ = typ it.fields[i] = field }