Skip to content

Commit c3cc04a

Browse files
Update for_helpers.py
1 parent c8880ac commit c3cc04a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

mypyc/irbuild/for_helpers.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ def sequence_from_generator_preallocate_helper(
241241
# If input is RTuple, box it to tuple_rprimitive for generic iteration
242242
# TODO: this can be optimized a bit better with an unrolled ForRTuple helper
243243
sequence = builder.coerce(sequence, tuple_rprimitive, gen.line, force=True)
244+
assert is_tuple_rprimitive(sequence.type), sequence.type
244245
else:
245246
length = get_expr_length_value(
246247
builder, sequence_expr, sequence, gen.line, use_pyssize_t=True

0 commit comments

Comments
 (0)