-
Notifications
You must be signed in to change notification settings - Fork 12.3k
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
C extends A but C does not extend A | B #59034
Comments
This is a fallout of an extra attempt to match combinations in I'd probably call it a design limitation as that fallback match is something that, IIRC, breaks some general rules. |
Maybe the fallback match could be improved a bit. The repro is very simple and should be handle correctly IMHO. |
Possibly related? #36969 |
π Search Terms
union extends
π Version & Regression Information
β― Playground Link
https://www.typescriptlang.org/play/?ts=5.5.2#code/C4TwDgpgBAglC8UDeUCGAuKBGANFARpgM7ABOAlgHYDmAvlAD7JqYBMUehUJFNtA3AFgAUKEhQAQgmYYorPAGNiZKtSgCRY6AGFpKWVkZzOy3mo3DN4aAHUA9qQDWRADwAVKBAAewCJQAmRLDS2gB80m5CotZQACJ2EEQAcnbA9k7unj5+gcFMUohhEfxAA
π» Code
π Actual behavior
An error tells that C does not extend A | B
π Expected behavior
No error since C extends A and therefore extends A | B
Additional information about the issue
No response
The text was updated successfully, but these errors were encountered: