From 90bd8edaf4b8d4745ef15e071c72934266d6cf42 Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Mon, 16 Sep 2024 18:14:44 -0300 Subject: [PATCH] revert change --- vlib/v/checker/fn.v | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/vlib/v/checker/fn.v b/vlib/v/checker/fn.v index d66aae43c5a13e..52e356f44be75f 100644 --- a/vlib/v/checker/fn.v +++ b/vlib/v/checker/fn.v @@ -859,9 +859,8 @@ fn (mut c Checker) fn_call(mut node ast.CallExpr, mut continue_check &bool) ast. c.error('json.decode: unknown type `${sym.name}`', node.pos) } } else { - typ_name := expr.type_name() - c.error('json.decode: first argument needs to be a type, got `${typ_name}`', - node.pos) + typ := expr.type_name() + c.error('json.decode: first argument needs to be a type, got `${typ}`', node.pos) return ast.void_type } c.expected_type = ast.string_type