don't narrow locals if there is a nonlocal
reference to it
#976
Labels
type checking / linting
issues relating to existing diagnostic rules or proposals for new diagnostic rules
playground
here, the
nonlocal a
is a direct indicator thata
will be mutated and should therefore not be narrowed:in a more complex analysis, we could only apply these widenings after the appropriate function (
m
) is invoked, this sounds plausible to do, but a lot more workThe text was updated successfully, but these errors were encountered: