Commit 16641d7
refactor(compiler): simplify isSlotAlignedSpine
Drop the two `info != nil` guards: the function reads info only after
confirming expr is an *ast.InfixExpression, and the solver caches every infix
node — it even reads a child's ExprInfo with no nil guard when caching the
parent (solver.go:1822), so a missing entry would already have panicked there.
info is never nil at these accesses.
Drop the `IsComparison() || IsLogicalOr() -> false` branch. It was a defensive
boundary to stop the recursion from descending into a comparison/|| node's
operands, but a value-position comparison/|| always carries a cond mode
(CondScalar/CondArray/CondOr), so the HasAnyComparison/HasFallbackOr true-check
above it fires first for every expression the solver produces — the branch
never decided an outcome. Easy to restore if cond-mode assignment ever changes.
No behavior change.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent c29de9e commit 16641d7
1 file changed
Lines changed: 2 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1214 | 1214 | | |
1215 | 1215 | | |
1216 | 1216 | | |
1217 | | - | |
| 1217 | + | |
1218 | 1218 | | |
1219 | 1219 | | |
1220 | | - | |
| 1220 | + | |
1221 | 1221 | | |
1222 | 1222 | | |
1223 | | - | |
1224 | | - | |
1225 | | - | |
1226 | 1223 | | |
1227 | 1224 | | |
1228 | 1225 | | |
| |||
0 commit comments