Open KotlinIsland opened 1 year ago
this is more of an issue in basedmypy than upstream, since variables are narrowed on initial assignment so it's easier to run into
a: int | None = None
for _ in range(2):
reveal_type(a) # None
a = 1
p-1 I suppose?
a
should be widened toint | None
at the start of the loop.workaround