2
0
mirror of https://github.com/m-labs/artiq.git synced 2025-01-20 15:46:41 +08:00

compiler: fix bool list inferred as int list

This commit is contained in:
Simon Renblad 2025-01-17 15:34:19 +08:00 committed by Sébastien Bourdeauducq
parent 2b48822fe3
commit ebb4058d09

View File

@ -310,7 +310,9 @@ class ASTSynthesizer:
if len(value) > 0: if len(value) > 0:
v = value[0] v = value[0]
is_T = True is_T = True
if isinstance(v, int): if isinstance(v, bool):
is_T = False
elif isinstance(v, int):
T = int T = int
elif isinstance(v, float): elif isinstance(v, float):
T = float T = float