Skip to content

Commit

Permalink
Adapted to master branch
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoeilers committed Jan 14, 2025
1 parent 84fdeac commit 7feba3f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/nagini_translation/translators/expression.py
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,8 @@ def translate_operator(self, left: Expr, right: Expr, left_type: PythonType,

if left_type == right_type or isinstance(right_type, TypeVar):
func_name = LEFT_OPERATOR_FUNCTIONS[type(node.op)]
if isinstance(node.op, ast.Pow) and left_type.python_class.name == INT_TYPE and isNum(node.right):
if (isinstance(node.op, ast.Pow) and left_type.python_class.name == INT_TYPE and
isinstance(node.right, ast.Constant) and isinstance(node.right.value, int)):
func_name = "__pow_unrolled__"
call_stmt, call = self.get_func_or_method_call(left_type, func_name, [left, right], [left_type, right_type], node, ctx)
if call is None:
Expand Down

0 comments on commit 7feba3f

Please sign in to comment.