From dfb1cbd6d56a848cfa044a4dbc37aad956a3c4ae Mon Sep 17 00:00:00 2001 From: Lycs-D <139197676+Lycs-D@users.noreply.github.com> Date: Thu, 11 Apr 2024 00:32:35 +0800 Subject: [PATCH] fix infer type of as expression --- src/analyzer/psi/TypeInferer.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/analyzer/psi/TypeInferer.v b/src/analyzer/psi/TypeInferer.v index 007a7c63..5732483b 100644 --- a/src/analyzer/psi/TypeInferer.v +++ b/src/analyzer/psi/TypeInferer.v @@ -87,7 +87,7 @@ pub fn (t &TypeInferer) infer_type_impl(elem ?PsiElement) types.Type { } if element.node.type_name == .as_type_cast_expression { - return t.infer_type(element.last_child()) + return t.convert_type(element.last_child(), mut visited) } if element.node.type_name in [.spawn_expression, .go_expression] {