- Notifications
You must be signed in to change notification settings - Fork664
Obtain target type before calling getBaseTypes#1409
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
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.
Pull Request Overview
This PR fixes#1294 by ensuring the checker obtains the underlying target type before querying its base types, and adds a compiler test to validate protected constructor accessibility through generic inheritance.
- Added a new compiler test (
protectedAccessibilityCheck.ts
) covering a protected constructor scenario across a generic class hierarchy. - Updated
typeHasProtectedAccessibleBase
inchecker.go
to usegetTargetType(t)
beforegetBaseTypes
. - Added corresponding
.types
and.symbols
baselines for the new test.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
File | Description |
---|---|
testdata/tests/cases/compiler/protectedAccessibilityCheck.ts | New test case for protected constructor accessibility in a generic inheritance chain |
testdata/baselines/reference/compiler/protectedAccessibilityCheck.types | Baseline types output for the new test |
testdata/baselines/reference/compiler/protectedAccessibilityCheck.symbols | Baseline symbols output for the new test |
internal/checker/checker.go | FixedtypeHasProtectedAccessibleBase to callgetTargetType beforegetBaseTypes |
2342d77
Uh oh!
There was an error while loading.Please reload this page.
Fixes#1294.