Skip to content

Commit 8a8517b

Browse files
Update irbuild-tuple.test
1 parent a302087 commit 8a8517b

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

mypyc/test-data/irbuild-tuple.test

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,38 @@ L4:
344344
a = r6
345345
return 1
346346

347+
[case testTupleBuiltFromListComprehension]
348+
def f(val: int) -> bool:
349+
return val % 2 == 0
350+
351+
def test() -> None:
352+
a = tuple(f(x) for x in [a * b for a in [1, 2, 3] for b in [1, 2, 3]])
353+
[out]
354+
def f(val):
355+
val, r0 :: int
356+
r1 :: bit
357+
L0:
358+
r0 = CPyTagged_Remainder(val, 4)
359+
r1 = int_eq r0, 0
360+
return r1
361+
def test():
362+
r0 :: list
363+
r1, r2, r3 :: object
364+
r4 :: ptr
365+
source :: list
366+
r5 :: native_int
367+
r6 :: tuple
368+
r7, r8 :: native_int
369+
r9 :: bit
370+
r10 :: object
371+
r11, x :: int
372+
r12 :: bool
373+
r13 :: object
374+
r14 :: native_int
375+
a :: tuple
376+
L0:
377+
r6 = PyTuple_New(9)
378+
347379
[case testTupleBuiltFromStr]
348380
def f2(val: str) -> str:
349381
return val + "f2"

0 commit comments

Comments
 (0)