Repository navigation
fix(compiler): reject null tool arguments - #58
Merged
Merged
Conversation
Signed-off-by: haseebahmed248 <haseebahmed6157@gmail.com>
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
The checker classified a null literal as String, so
echo(text: null)passed compilation. Infer null separately and compare type structure rather than diagnostic names, rejecting the invalid call before execution.Related issue
Closes #35
This follows up the now-closed #46 against current main.
Changes
nulldistinct from a null literal during type comparison.GS2105message and range checked through the compiler API and CLI."null", and null model context through JSON IR, generated contracts and execution.Validation
npm run checknpm run check:generatednpm test— 184 tests passed.npm run test:release— 4 passed;npm run test:package— 115 files, 7 exports and 2 executables verified;git diff --checkpassed.Before the fix, the reproduction passed CLI checking and the new String rejection test failed with a missing exception. After the fix, it is rejected with
GS2105. The positive string and null-context tests pass before and after.Risk and compatibility
Checklist
Signed-off-byline.