Repository navigation
Fix crash on inherited export type * members - #65823
Open
Max Schwenk (maschwenk) wants to merge 1 commit into
Open
Max Schwenk (maschwenk) wants to merge 1 commit into
Max Schwenk (maschwenk) wants to merge 1 commit into
Conversation
Max Schwenk (maschwenk)
marked this pull request as ready for review
December 5, 2026 15:12
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
There are no active review issues for the inherited type-only member resolution fix.
No open issues 🎉
What changed in this PR
Fixes #65821, a compiler crash introduced by lazy member resolution when a class inherits namespace members from export type *.
Changes:
- Includes type-only members when resolving inherited property slots.
- Adds regression coverage for object spreads and property access with strict mode enabled and disabled.
- Records expected type and symbol baselines.
| File | Description |
|---|---|
tsc/testdata/tests/cases/compiler/inheritedTypeOnlyExportStarMember.ts |
Tests both strict settings. |
tsc/testdata/baselines/reference/compiler/inheritedTypeOnlyExportStarMember(strict=true).types |
Records strict-mode types. |
tsc/testdata/baselines/reference/compiler/inheritedTypeOnlyExportStarMember(strict=true).symbols |
Records strict-mode symbols. |
tsc/testdata/baselines/reference/compiler/inheritedTypeOnlyExportStarMember(strict=false).types |
Records non-strict types. |
tsc/testdata/baselines/reference/compiler/inheritedTypeOnlyExportStarMember(strict=false).symbols |
Records non-strict symbols. |
tsc/internal/checker/types.go |
Resolves inherited type-only members without leaving nil slots. |
Review effort: Balanced
This branch has not been deployed
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.
Fixes #65821
This is an automated PR authored by Claude Code using Claude Opus 5.5 with Extra High reasoning level.
Motivation & Guidance
Motivation: The user asked me to fix #65821.
Guidance:
Analysis
Since #64915 (8d9b6da), layout member names for a module base
typeof nscome fromgetPropertiesOfType, which includesexport type *members.getPropertyAtfills each slot withgetPropertyOfType, which returns nil fortypeOnlyExportStarMapmembers. Spreads andvalue.xcrash on the nil slot. Before #64915, the class copiedgetPropertiesOfType's symbols. 6.0 and 7.1.0-beta report no errors.Fix
getPropertyAtnow callsgetPropertyOfTypeExwithincludeTypeOnlyMembersto findexport type *members. Omitting them from the layout would makevalue.xan error. Hiding them fromgetPropertiesOfTypewould changekeyof typeof ns.The new test crashes on main under both
strictsettings. No other baselines change.