Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
ahejlsberg merged 2 commits intomainfromfix-1294
Jul 16, 2025
Merged

Conversation

ahejlsberg
Copy link
Member

Fixes#1294.

zsilbi reacted with heart emoji
Copy link
Contributor

@CopilotCopilotAI left a 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.
  • UpdatedtypeHasProtectedAccessibleBase 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.

FileDescription
testdata/tests/cases/compiler/protectedAccessibilityCheck.tsNew test case for protected constructor accessibility in a generic inheritance chain
testdata/baselines/reference/compiler/protectedAccessibilityCheck.typesBaseline types output for the new test
testdata/baselines/reference/compiler/protectedAccessibilityCheck.symbolsBaseline symbols output for the new test
internal/checker/checker.goFixedtypeHasProtectedAccessibleBase to callgetTargetType beforegetBaseTypes

@ahejlsbergahejlsberg added this pull request to themerge queueJul 16, 2025
Merged via the queue intomain with commit2342d77Jul 16, 2025
22 checks passed
@ahejlsbergahejlsberg deleted the fix-1294 branchJuly 16, 2025 15:34
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

Copilot code reviewCopilotCopilot left review comments

@jakebaileyjakebaileyjakebailey approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Crash with protected constructor and generic intermediate class
2 participants
@ahejlsberg@jakebailey

[8]ページ先頭

©2009-2025 Movatter.jp