From ebb4058d09226a0900ca8ede8e0b87299fb884ea Mon Sep 17 00:00:00 2001 From: Simon Renblad Date: Fri, 17 Jan 2025 15:34:19 +0800 Subject: [PATCH] compiler: fix bool list inferred as int list --- artiq/compiler/embedding.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/artiq/compiler/embedding.py b/artiq/compiler/embedding.py index f854686f8..233d2b8fb 100644 --- a/artiq/compiler/embedding.py +++ b/artiq/compiler/embedding.py @@ -310,7 +310,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