Skip to content

Commit e339c4a

Browse files
authored
Update src/lpython/semantics/python_comptime_eval.h
1 parent 555b354 commit e339c4a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lpython/semantics/python_comptime_eval.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ struct PythonIntrinsicProcedures {
250250
if (!ASRUtils::check_equal_type(arg1_type, arg2_type)) {
251251
throw SemanticError("The arguments to pow() must have the same type.", loc);
252252
}
253-
if (ASRUtils::is_integer(*arg1_type) || ASRUtils::is_integer(*arg1_type)) {
253+
if (ASRUtils::is_integer(*arg1_type) && ASRUtils::is_integer(*arg2_type)) {
254254
int64_t a = ASR::down_cast<ASR::ConstantInteger_t>(arg1)->m_n;
255255
int64_t b = ASR::down_cast<ASR::ConstantInteger_t>(arg2)->m_n;
256256
if (a == 0 && b < 0) { // Zero Division

0 commit comments

Comments
 (0)