Skip to content

Commit

Permalink
fix infer type of as expression
Browse files Browse the repository at this point in the history
  • Loading branch information
Lycs-D committed Apr 10, 2024
1 parent 9ba1aa8 commit dfb1cbd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/analyzer/psi/TypeInferer.v
Original file line number Diff line number Diff line change
Expand Up @@ -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] {
Expand Down

0 comments on commit dfb1cbd

Please sign in to comment.