Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static Python: primitive types don't support pow operator #25

Open
belm0 opened this issue Jun 9, 2021 · 0 comments
Open

Static Python: primitive types don't support pow operator #25

belm0 opened this issue Jun 9, 2021 · 0 comments
Assignees
Labels
sp-correctness static python correctness staticpython static python issues

Comments

@belm0
Copy link
Contributor

belm0 commented Jun 9, 2021

(and there is an exception while assembling the error message)

def test(x: double, y: double) -> double:
    return x ** y
  File "/usr/lib/python3.8/compiler/visitor.py", line 70, in visit
    return meth(node, *args)
  File "/usr/lib/python3.8/compiler/static.py", line 5995, in visitBinOp
    if ltype.bind_binop(node, self, type_ctx):
  File "/usr/lib/python3.8/compiler/static.py", line 4866, in bind_binop
    raise visitor.syntax_error(self.binop_error(self, rtype, node.op), node)
  File "/usr/lib/python3.8/compiler/static.py", line 4398, in binop_error
    return f"cannot {self._op_name[type(op)]} {left.name} and {right.name}"
KeyError: <class '_ast.Pow'>
@carljm carljm added sp-correctness static python correctness staticpython static python issues labels Jun 9, 2021
@sinancepel sinancepel self-assigned this Dec 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sp-correctness static python correctness staticpython static python issues
Projects
None yet
Development

No branches or pull requests

3 participants