parser: remove option from err var type

pull/4055/head
Joe Conigliaro 2020-03-18 20:00:33 +11:00
parent 126ef0f5c2
commit 54c38e3e3a
2 changed files with 2 additions and 2 deletions

View File

@ -20,7 +20,7 @@ pub fn (p mut Parser) call_expr(is_c bool, mod string) ast.CallExpr {
p.open_scope() p.open_scope()
p.scope.register_var(ast.Var{ p.scope.register_var(ast.Var{
name: 'err' name: 'err'
typ: table.type_to_optional(table.string_type) typ: table.string_type
}) })
or_stmts = p.parse_block_no_scope() or_stmts = p.parse_block_no_scope()
p.close_scope() p.close_scope()

View File

@ -961,7 +961,7 @@ fn (p mut Parser) dot_expr(left ast.Expr) ast.Expr {
p.open_scope() p.open_scope()
p.scope.register_var(ast.Var{ p.scope.register_var(ast.Var{
name: 'err' name: 'err'
typ: table.type_to_optional(table.string_type) typ: table.string_type
}) })
or_stmts = p.parse_block_no_scope() or_stmts = p.parse_block_no_scope()
p.close_scope() p.close_scope()