-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Weak generic constraint check #42145
Comments
Note that neither the method nor the union types are necessary to repro: type Emit<E extends number> = <T extends E>(event: T) => T
declare let emit0: Emit<0>;
declare let emit1: Emit<1>;
emit0 = emit1;
emit1 = emit0; |
I think that this is a duplicate of #31006 - @ahejlsberg can you confirm? |
Relevant design meeting might be #31132. |
It's hard to imagine that accessing some type in type level closure may cause so many problems |
I'm going to assume this is a duplicate. |
This issue has been marked as a 'Duplicate' and has seen no recent activity. It has been automatically closed for house-keeping purposes. |
TypeScript Version: 4.2.0-dev.20201222
Search Terms: generic constraint check
Code
Expected behavior:
EmitAB is not assignable to EmitCD
Actual behavior:
No error
The text was updated successfully, but these errors were encountered: