From 54c38e3e3a533b94c2df1568e5c46a888ac8304a Mon Sep 17 00:00:00 2001 From: Joe Conigliaro Date: Wed, 18 Mar 2020 20:00:33 +1100 Subject: [PATCH] parser: remove option from err var type --- vlib/v/parser/fn.v | 2 +- vlib/v/parser/parser.v | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vlib/v/parser/fn.v b/vlib/v/parser/fn.v index c2b32f5f86..3610d38722 100644 --- a/vlib/v/parser/fn.v +++ b/vlib/v/parser/fn.v @@ -20,7 +20,7 @@ pub fn (p mut Parser) call_expr(is_c bool, mod string) ast.CallExpr { p.open_scope() p.scope.register_var(ast.Var{ name: 'err' - typ: table.type_to_optional(table.string_type) + typ: table.string_type }) or_stmts = p.parse_block_no_scope() p.close_scope() diff --git a/vlib/v/parser/parser.v b/vlib/v/parser/parser.v index ce60de1930..cbbe993823 100644 --- a/vlib/v/parser/parser.v +++ b/vlib/v/parser/parser.v @@ -961,7 +961,7 @@ fn (p mut Parser) dot_expr(left ast.Expr) ast.Expr { p.open_scope() p.scope.register_var(ast.Var{ name: 'err' - typ: table.type_to_optional(table.string_type) + typ: table.string_type }) or_stmts = p.parse_block_no_scope() p.close_scope()