Commit 9445d1f
Fix chain.rb nil-safety instead of suppressing the typecheck warning
apiology asked, on the receiver_path plumbing added for castwide#1249, whether
the @sg-ignore on links.last.resolve was hiding a real bug rather than
a false positive. It wasn't reachable (Chain's constructor pads an
empty links array with UNDEFINED_CALL, so links is never empty, but
suppressing it instead of expressing that invariant in the code was
the wrong call. Extract links.last once and guard it for real.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KGu6zb5faStTC754PxMUSA
EOF
)1 parent c2a16e5 commit 9445d1f
1 file changed
Lines changed: 7 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
141 | | - | |
142 | | - | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
143 | 147 | | |
144 | 148 | | |
145 | 149 | | |
| |||
0 commit comments