strict-truthiness fixes !!x whole: no more x === 0 === 0 #152
Loading…
Reference in a new issue
No description provided.
Delete branch "double-not-fix"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
From adopter feedback: the quick fix on
!!c.interrupt[feeling]wrotec.interrupt[feeling] === 0 === 0, which is always false.Cause. The walk took the inner
!xof!!xas the test. Compare with 0 replaced only that inner part withx === 0, and the re-check then rewrote the outer!(x === 0)again.Fix. The walk now counts the
!s. An even number cancels out, and the fix replaces the whole!!x:!!nbecomesn !== 0orn > 0.!!!nbecomesn === 0.Tests. New cases in
tests/fixes.rs. The meaning harness (tests/meaning.rs) gets!!$Xand!!$X && …shapes: it reports 211 problems without the fix and passes with it.cargo nextest run --workspace: 413 passed.npm run test:docspasses.Docs: the strict-truthiness quick-fix table and a CHANGELOG entry.
🤖 Generated with Claude Code
!!xwhole: no morex === 0 === 0