File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -1829,8 +1829,12 @@ class IfStmt(Statement):
18291829
18301830 expr : list [Expression ]
18311831 body : list [Block ]
1832- else_body : Block | None
1833- unreachable_else : bool
1832+ else_body : Block | None # If there is actually no else statement, semantic analysis may nevertheless
1833+ # create an empty else block and mark it permanently as unreachable to tell
1834+ # that the control flow must always go through the if block.
1835+ unreachable_else : bool # Type checking may modify this flag repeatedly to indicate whether an actually
1836+ # available or unavailable else block is unreachable, considering the currently
1837+ # available type information.
18341838
18351839 def __init__ (self , expr : list [Expression ], body : list [Block ], else_body : Block | None ) -> None :
18361840 super ().__init__ ()
You can’t perform that action at this time.
0 commit comments