-
Notifications
You must be signed in to change notification settings - Fork 2
Fix internal errors in type checker #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.6.1 to 6.0.0. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@v4.6.1...v6.0.0) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: 6.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.2.2 to 6.0.1. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v4.2.2...v6.0.1) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 6.0.1 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]>
Bumps [actions/github-script](https://github.com/actions/github-script) from 7.0.1 to 8.0.0. - [Release notes](https://github.com/actions/github-script/releases) - [Commits](actions/github-script@v7.0.1...v8.0.0) --- updated-dependencies: - dependency-name: actions/github-script dependency-version: 8.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resyntax analyzed 15 files in this pull request and found no issues.
…od types When a non-function type is used as a method type, function->method now returns a proper type error with a dummy function type instead of raising an internal error. Co-Authored-By: Claude Opus 4.5 <[email protected]> Closes racket#929
Previously, dcon-meet would hit an internal error when encountering a dcon-exact paired with dcon-dotted. Added explicit cases to return Co-Authored-By: Claude Opus 4.5 <[email protected]> Closes racket#509
When looking up a struct property type, consolidated error handling into a single match expression that properly handles missing types and non- struct-property types instead of causing internal errors. Co-Authored-By: Claude Opus 4.5 <[email protected]> Closes racket#1352
Added null checks in compute-defs to handle cases where identifier-binding returns #f or when the definition lookup fails. This fixes internal errors with recursive MListof types, recursive case-> types, and recursive contract generation. Co-Authored-By: Claude Opus 4.5 <[email protected]> Closes racket#1158 Closes racket#848 Closes racket#858
Added defensive patterns to handle void values that can propagate through the type checker when earlier errors occur. Updated add-unconditional-prop, add-unconditional-prop-all-args, and type-table->tooltips to gracefully handle invalid inputs. Co-Authored-By: Claude Opus 4.5 <[email protected]> Closes racket#1157
2d49182 to
879e625
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resyntax analyzed 15 files in this pull request and found no issues.
Row type variables (declared with #:row) may only appear in (Class #:row-var ...) positions, not directly as types. Previously, code like (All (r #:row) (-> r r)) was accepted but caused internal errors during type checking. This fix adds validation in parse-type.rkt to reject row type variables in invalid positions at parse time, providing a clear error message. Also keeps defensive checks in check-below.rkt for Row types and void values from error propagation. Closes racket#1146
879e625 to
9cf6154
Compare
The Class: match expander from types/classes.rkt returns 6 fields: row-ext, inits, fields, methods, augments, init-rest. The previous code incorrectly bound the second field to 'row' expecting it to be a Row type, but it was actually 'inits' (a list of tuples that can be '() when empty). This caused a contract violation when trying to call Rep-for-each on '()'. Fixed by using correct field names and iterating through the row member lists to check their types for invalid row variable usage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resyntax analyzed 16 files in this pull request and found no issues.
Summary
require/typedracket/typed-racket#1352: Add validation in has-struct-property->scprovideand recursiveMListof. racket/typed-racket#1158, Error when providing values that use recursivecase->types racket/typed-racket#848, Invalid recursive contract generated racket/typed-racket#858: Add null checks in compute-defs(All (r #:row) body)racket/typed-racket#1146: Handle Row types and void in check-belowEach commit includes a test for the fix.
Test plan
racket -l typed-racket-test -- --just <test>🤖 Generated with Claude Code