Skip to content

Commit

Permalink
fix: fixed is operator not comparing properly
Browse files Browse the repository at this point in the history
  • Loading branch information
alinalihassan committed Apr 21, 2023
1 parent 62a4355 commit c0c78d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/liblesma/Backend/Codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1189,9 +1189,9 @@ void Codegen::visit(const IsOp *node) {
llvm::Value *val;

if (node->getOperator() == TokenType::IS) {
val = left_type == right_type ? Builder->getTrue() : Builder->getFalse();
val = *left_type == *right_type ? Builder->getTrue() : Builder->getFalse();
} else {
val = left_type == right_type ? Builder->getFalse() : Builder->getTrue();
val = *left_type == *right_type ? Builder->getFalse() : Builder->getTrue();
}

result = new Value("", new Type(TY_BOOL, Builder->getInt1Ty()), val);
Expand Down

0 comments on commit c0c78d6

Please sign in to comment.