SIGN IN SIGN UP

inference: keep distinct const-prop'd pseudo CIs sharing a MI (#61754)

`add_one_edge!` previously deduplicated by `MethodInstance` alone,
dropping any subsequent `CodeInstance` whose `def` matched an existing
edge. When two const-prop'd pseudo `CodeInstance`s for the same method
record different forward edges (e.g. distinct `Binding` edges produced
by const-prop'ing the same callee with different constant arguments),
the second one was silently discarded, breaking invalidation of the
caller when its bindings were redefined.

Only dedup when the existing entry is the same object or its forward
edges are identical and its world range covers the new one; otherwise
keep both.

This was found by Claude looking at #61745, but is a distinct issue
AFAICT.

Co-authored-by: Keno Fischer <Keno@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
K
Keno Fischer committed
829b43f9f2c16e5af22d3ce7ca5746e23952840b
Parent: 68b586a
Committed by GitHub <noreply@github.com> on 5/29/2026, 8:30:14 PM