mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-03-15 14:05:47 -05:00
Add regression test
This commit is contained in:
@@ -14,3 +14,11 @@ export declare function foo2<T>(obj: T): T extends { [K in keyof BadNested<infer
|
||||
export function bar2<T>(obj: T) {
|
||||
return foo2(obj);
|
||||
}
|
||||
|
||||
// Repros from #31099
|
||||
|
||||
type Weird = any extends infer U ? U : never;
|
||||
type AlsoWeird = unknown extends infer U ? U : never;
|
||||
|
||||
const a: Weird = null;
|
||||
const b: string = a;
|
||||
|
||||
Reference in New Issue
Block a user