Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add regression test
  • Loading branch information
ahejlsberg committed Apr 27, 2019
1 parent 5a567ad commit 0783757
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/cases/conformance/types/conditional/inferTypes2.ts
Expand Up @@ -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;

0 comments on commit 0783757

Please sign in to comment.