2
0
mirror of https://github.com/m-labs/artiq.git synced 2025-01-23 09:06:42 +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 8b5d7d06e9
commit a98bccb2bb

View File

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