From 45004ce812250182e8bbe1fd5561ad0f67542cdb Mon Sep 17 00:00:00 2001 From: lisyarus Date: Mon, 5 Jan 2026 10:23:13 +0300 Subject: [PATCH] Fix inferring type of a != expression node --- libs/ast/source/type_check.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libs/ast/source/type_check.cpp b/libs/ast/source/type_check.cpp index 26fbc99..755e6bd 100644 --- a/libs/ast/source/type_check.cpp +++ b/libs/ast/source/type_check.cpp @@ -130,8 +130,6 @@ namespace pslang::ast apply(*node.arg1); auto arg1_type = get_type(*node.arg1); - bool good = false; - switch (node.type) { case unary_operation_type::negation: @@ -233,7 +231,10 @@ namespace pslang::ast break; case binary_operation_type::not_equals: if (equal) + { + node.inferred_type = std::make_unique(types::bool_type{}); return; + } break; case binary_operation_type::less: if (equal)