Skip to content

Commit 4c35bd4

Browse files
Update for_helpers.py
1 parent 26f390f commit 4c35bd4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mypyc/irbuild/for_helpers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ def make_for_loop_generator(
460460
# Special case: tuple/list/set literal (unroll the loop)
461461
if is_iterable_expr_with_literal_mambers(expr):
462462
return ForUnrolledSequenceLiteral(
463-
builder, index, body_block, loop_exit, line, expr, body_insts
463+
builder, index, body_block, loop_exit, line, expr, body_insts # type: ignore [arg-type]
464464
)
465465

466466
# Special case: RTuple (known-length tuple, struct field iteration)
@@ -476,10 +476,10 @@ def make_for_loop_generator(
476476
builder, index, body_block, loop_exit, line, expr.value, expr, body_insts
477477
)
478478

479-
# Special case: string literal (unroll the loop)
479+
# Special case: bytes literal (unroll the loop)
480480
if isinstance(expr, BytesExpr):
481481
return ForUnrolledBytesLiteral(
482-
builder, index, body_block, loop_exit, line, expr.value, expr, body_insts
482+
builder, index, body_block, loop_exit, line, expr.value.encode(), expr, body_insts
483483
)
484484

485485
if is_sequence_rprimitive(rtyp):

0 commit comments

Comments
 (0)