Fix inferring type of a != expression node
This commit is contained in:
parent
8f5744c3f4
commit
45004ce812
1 changed files with 3 additions and 2 deletions
|
|
@ -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::type>(types::bool_type{});
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case binary_operation_type::less:
|
||||
if (equal)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue