mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-12-14 15:33:32 -06:00
Add regression test
This commit is contained in:
parent
b2a517e314
commit
4fef35cdd0
9
tests/cases/conformance/types/conditional/inferTypes2.ts
Normal file
9
tests/cases/conformance/types/conditional/inferTypes2.ts
Normal file
@ -0,0 +1,9 @@
|
||||
// @strict: true
|
||||
// @declaration: true
|
||||
|
||||
// Repro from #22755
|
||||
|
||||
export declare function foo<T>(obj: T): T extends () => infer P ? P : never;
|
||||
export function bar<T>(obj: T) {
|
||||
return foo(obj);
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user