Fix bug in type conciliation function

Casting wasn't enough, it needed to call to_uint().
This commit is contained in:
Sei Lisa 2019-01-15 01:22:44 +01:00
parent 6dfbd804d0
commit 138d042b2e

View file

@ -244,7 +244,7 @@ class Evaluator(object):
"""Perform usual arithmetic conversions on two operands.""" """Perform usual arithmetic conversions on two operands."""
assert type(op1) in (sint, uint) and type(op2) in (sint, uint) assert type(op1) in (sint, uint) and type(op2) in (sint, uint)
if type(op1) != type(op2): if type(op1) != type(op2):
return uint(op1), uint(op2) return self.to_uint(op1), self.to_uint(op2)
return op1, op2 return op1, op2
def primary_expression(self, evaluating): def primary_expression(self, evaluating):