Open
Description
Really strange behavior here, when this statement is on the module level it creates a silently unreachable branch, but when in a scope it doesn't create unreachable
import sys
def foo() -> None:
assert sys.platform == "AMONGUS"
a # error, reachable ❌
cond: bool
if cond:
assert sys.platform == "AMONGUS"
a # error, reachable ❌
assert sys.platform == "AMONGUS"
a # no error, silent unreachable ✅