Skip to content

Conversation

@Andarist
Copy link
Contributor

fixes #60815


function isDistributionDependent(root: ConditionalRoot) {
return root.isDistributive && (
return root.isDistributive && !(root.extendsType.flags & TypeFlags.AnyOrUnknown) && (
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't correct as it removes those correct errors:

function f5<T>(t1: { x: T; y: T }, t2: T extends any ? { x: T; y: T } : never) {
  t1 = t2; // OK
  t2 = t1; // should fail
}

function f6<T>(t1: { x: T; y: T }, t2: T extends unknown ? { x: T; y: T } : never) {
  t1 = t2; // OK
  t2 = t1; // should fail
}

@Andarist Andarist closed this Dec 19, 2024
@sandersn sandersn removed this from PR Backlog Apr 22, 2025
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How is assignability b/w two uninstantiated generics checked?

2 participants