forked from M-Labs/artiq
compiler: Fix comparison of tuples of lists
This commit is contained in:
parent
2cbb2b970c
commit
56e14bfac7
@ -1426,7 +1426,7 @@ class ARTIQIRGenerator(algorithm.Visitor):
|
||||
for index in range(len(lhs.type.elts)):
|
||||
lhs_elt = self.append(ir.GetAttr(lhs, index))
|
||||
rhs_elt = self.append(ir.GetAttr(rhs, index))
|
||||
elt_result = self.append(ir.Compare(op, lhs_elt, rhs_elt))
|
||||
elt_result = self.polymorphic_compare_pair(op, lhs_elt, rhs_elt)
|
||||
if result is None:
|
||||
result = elt_result
|
||||
else:
|
||||
|
@ -5,3 +5,9 @@ x, y = 2, 1
|
||||
x, y = y, x
|
||||
assert x == 1 and y == 2
|
||||
assert (1, 2) + (3.0,) == (1, 2, 3.0)
|
||||
|
||||
assert (0,) == (0,)
|
||||
assert (0,) != (1,)
|
||||
|
||||
assert ([0],) == ([0],)
|
||||
assert ([0],) != ([1],)
|
||||
|
Loading…
Reference in New Issue
Block a user