Skip to content

fix: string ordering operators use strcmp instead of broken single-char optimization#317

Merged
cs01 merged 1 commit intomainfrom
fix-string-comparison-operators
Mar 13, 2026
Merged

fix: string ordering operators use strcmp instead of broken single-char optimization#317
cs01 merged 1 commit intomainfrom
fix-string-comparison-operators

Conversation

@cs01
Copy link
Copy Markdown
Owner

@cs01 cs01 commented Mar 13, 2026

Summary

  • String comparison operators (>, <, >=, <=) were incorrectly handled by the single-char literal optimization path, which only implemented ==/!= but returned wrong results for ordering operators (treating > as !=)
  • Now ordering operators correctly fall through to strcmp-based comparison
  • Fixes string comparisons both at top level and inside lambda/filter callbacks

Test plan

  • New test fixture strings/string-comparison-operators.ts covers all ordering operators and filter lambdas
  • npm run verify:quick passes

🤖 Generated with Claude Code

@cs01 cs01 merged commit ea65a03 into main Mar 13, 2026
12 checks passed
@cs01 cs01 deleted the fix-string-comparison-operators branch March 13, 2026 04:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant