File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -607,11 +607,11 @@ def accept_loop(
607607 """
608608 # The outer frame accumulates the results of all iterations
609609 with self .binder .frame_context (can_skip = False , conditional_frame = True ):
610- partials_old = len (self .partial_types [ 0 ]. map )
610+ partials_old = sum ( len (pts . map ) for pts in self .partial_types )
611611 while True :
612612 with self .binder .frame_context (can_skip = True , break_frame = 2 , continue_frame = 1 ):
613613 self .accept (body )
614- partials_new = len (self .partial_types [ 0 ]. map )
614+ partials_new = sum ( len (pts . map ) for pts in self .partial_types )
615615 if (partials_new == partials_old ) and not self .binder .last_pop_changed :
616616 break
617617 partials_old = partials_new
Original file line number Diff line number Diff line change @@ -2379,4 +2379,13 @@ def g() -> None:
23792379 z[0] + "v" # E: Unsupported operand types for + ("int" and "str")
23802380 z.append(1)
23812381
2382+ class A:
2383+ def g(self) -> None:
2384+ z = [] # E: Need type annotation for "z" (hint: "z: List[<type>] = ...")
2385+ for i in range(2):
2386+ while f():
2387+ if z:
2388+ z[0] + "v" # E: Unsupported operand types for + ("int" and "str")
2389+ z.append(1)
2390+
23822391[builtins fixtures/primitives.pyi]
You can’t perform that action at this time.
0 commit comments