Skip to content

Commit

Permalink
DEV: Fix result type of ComplexCompare node
Browse files Browse the repository at this point in the history
  • Loading branch information
czgdp1807 committed Mar 12, 2024
1 parent f30265e commit 8428d48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lc/clang_ast_to_asr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1835,7 +1835,7 @@ class ClangASTtoASRVisitor: public clang::RecursiveASTVisitor<ClangASTtoASRVisit
} else if( ASRUtils::is_logical(*left_type) && ASRUtils::is_logical(*right_type) ) {
tmp = ASR::make_LogicalCompare_t(al, loc, lhs, cmpop_type, rhs, result_type, nullptr);
} else if( ASRUtils::is_complex(*left_type) && ASRUtils::is_complex(*right_type) ) {
tmp = ASR::make_ComplexCompare_t(al, loc, lhs, cmpop_type, rhs, left_type, nullptr);
tmp = ASR::make_ComplexCompare_t(al, loc, lhs, cmpop_type, rhs, result_type, nullptr);
} else {
throw std::runtime_error("Only integer, real and complex types are supported so "
"far for comparison operator, found: " + ASRUtils::type_to_str(left_type)
Expand Down

0 comments on commit 8428d48

Please sign in to comment.