[red-knot] Combine terminal statement support with statically known branches #15817
Add ALWAYS_FALSE
02c47981
Mark return states
2c0d577a
Mark live bindings as non-visible when flow is unreachable
e1988064
Revert "Mark return states"
23b366d4
Handle final return statement specially
38f3d99d
Customizable binding visibility
5c1918af
Reachability is now a vis constraint, not a bool
7504fb74
Fix ternary AND logic
ee6f2538
These are now unresolved I guess?
6b53554f
clippy
bb11cf81
dcreager
marked this pull request as ready for review 1 year ago
dcreager
marked this pull request as draft 1 year ago
Normalize negations of ALWAYS_{TRUE,FALSE}
a2ef7028
scope_start_visibility _is_ reachability
1c42a2b5
No, bindings are always visible
289c0c65
TODO for `raise`/`else` unreachability
8b0899f9
Fix test failure
9cd8e684
Expected test case change
1a80f819
Try to skip simplification by checking scope_start_visibility
f71325c2
And try via a separate `always_reachable` boolean
0e060120
Add AlwaysFalse as its own constraint variant
b3b4577b
Update always_reachable on merge correctly
46b1ec2b
Try checking if reachability contains AlwaysFalse in syntax tree
999188a1
But that doesn't work either
0f278daf
Merge branch 'main' into dcreager/static-terminal
0fb6a742
This is working again
c882a956
Remove static bool
33db6f1e
Remove moot comment
b49916d6
And another
c80f27e3
New bindings are visible only if control flow is reachable
0d50385c
Add xfail for RET503
c42490cb
dcreager
marked this pull request as ready for review 1 year ago
dcreager
changed the title [red-knot] [WIP] Combine terminal statement support with statically known branches [red-knot] Combine terminal statement support with statically known branches 1 year ago
carljm
approved these changes
on 2025-01-30
carljm
commented
on 2025-02-04
carljm
commented
on 2025-02-04
Update terminal statement comment
26f842b4
Add shorter example for bindings after terminal statement
e5b6c4ac
Add back debug derive
00e236fa
Add TODO to function symbol comment
1d936504
Wrap try examples in functions to bound reachability
ae837410
Spelling typo
f13a6a6a
Add TODO for unreachable code example
7423de29
dcreager
merged
09065543
into main 1 year ago
dcreager
deleted the dcreager/static-terminal branch 1 year ago
Assignees
No one assigned
Login to write a write a comment.
Login via GitHub