Skip to content

Commit

Permalink
Compiler: Fix return type of vector comparison (vec1 > vec2 produces …
Browse files Browse the repository at this point in the history
…a vec bool)
  • Loading branch information
SirLynix committed Sep 9, 2023
1 parent b508d0c commit 17886e0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/NZSL/Ast/SanitizeVisitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5711,6 +5711,9 @@ namespace nzsl::Ast
case BinaryType::CompGt:
case BinaryType::CompLe:
case BinaryType::CompLt:
TypeMustMatch(leftExprType, rightExprType, sourceLocation);
return VectorType{ leftType.componentCount, PrimitiveType::Boolean };

case BinaryType::CompEq:
case BinaryType::CompNe:
TypeMustMatch(leftExprType, rightExprType, sourceLocation);
Expand Down

0 comments on commit 17886e0

Please sign in to comment.