Fix power operation, fixes #1268

This commit is contained in:
Dave Halter
2018-12-25 00:51:22 +01:00
parent d3f205f634
commit 1c80705276
2 changed files with 6 additions and 1 deletions

View File

@@ -84,7 +84,7 @@ def eval_node(context, element):
had_await = True had_await = True
first_child = children.pop(0) first_child = children.pop(0)
context_set = eval_atom(context, first_child) context_set = context.eval_node(first_child)
for trailer in children: for trailer in children:
if trailer == '**': # has a power operation. if trailer == '**': # has a power operation.
right = context.eval_node(children[1]) right = context.eval_node(children[1])

View File

@@ -57,6 +57,11 @@ a
#? int() str() #? int() str()
(3 ** 'a') (3 ** 'a')
class X():
foo = 2
#? int()
(X.foo ** 3)
# ----------------- # -----------------
# assignments # assignments
# ----------------- # -----------------