fix(compiler): reject unsupported ordering comparisons - #44
Merged
haseebahmed248 merged 1 commit intoSep 6, 2026
Merged
Conversation
Signed-off-by: omergungor11 <omergungor99@gmail.com>
10 tasks
haseebahmed248
approved these changes
Sep 6, 2026
Owner
There was a problem hiding this comment.
Thanks @omergungor11, this fixes #36 without changing the supported comparisons. The checks and all 102 tests pass, including the compiler and CLI regressions. CI is green too.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
require true > false else ASSERTcurrently passes semantic checking, then throwsRelational comparison requires numbers or stringsat runtime. Reject ordering on booleans, records and lists during compilation with a source-locatedGS2105diagnostic.Related issue
Closes #36
Changes
String,Urland same-enum ordering. Equality and runtime coercion behavior are unchanged.Validation
npm run checknpm run check:generatednpm test— 102 tests passedAdditional validation:
npm run test:release(4 tests passed) andnpm run test:package(111 files, 7 exports and 2 executables verified). Tested locally on Node 22.22.3. Before the compiler fix, the new comparison suite had 13 failing regressions and 24 passing supported-behavior tests; after the fix all passed. No model provider or host effects were needed.Risk and compatibility
Checklist
Signed-off-byline.Implementation and test preparation were assisted by OpenAI Codex; the validation results above were run against this patch.