Skip to content
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

60881 #61145

Draft
wants to merge 20 commits into
base: main
Choose a base branch
from
Draft

60881 #61145

wants to merge 20 commits into from

Conversation

NamHaiBui
Copy link

@NamHaiBui NamHaiBui commented Feb 7, 2025

Fixes #60881

Solution:
src/compiler/checker.ts: Added a new condition to check if the source is valid for assignment and if target is assignable to source and report an error with an appropriate new diagnostic if it is constrained to be a subtype.

src/compiler/diagnosticMessages.json: Added a new diagnostic error message for types constrained to be subtypes of other types.

@NamHaiBui
Copy link
Author

@microsoft-github-policy-service agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

misleading error message on invalid assignment when one type parameter extends another
2 participants