mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-10 15:25:54 -06:00
Add regression test
This commit is contained in:
parent
22cbfe3b1b
commit
94e0df39cc
@ -127,3 +127,8 @@ type B1<S> = S extends A1<infer T, infer U> ? [T, U] : never;
|
||||
type A2<T, U extends void> = [T, U];
|
||||
type B2<S> = S extends A2<infer T, infer U> ? [T, U] : never;
|
||||
type C2<S, U extends void> = S extends A2<infer T, U> ? [T, U] : never;
|
||||
|
||||
// Repro from #21735
|
||||
|
||||
type A<T> = T extends string ? { [P in T]: void; } : T;
|
||||
type B<T> = string extends T ? { [P in T]: void; } : T; // Error
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user