mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Add regression test
This commit is contained in:
@@ -134,3 +134,10 @@ function test<T extends { a: string, b: string }>(obj: T): T {
|
||||
let { a, ...rest } = obj;
|
||||
return { a: 'hello', ...rest } as T;
|
||||
}
|
||||
|
||||
// Repro from #32169
|
||||
|
||||
declare function f<T>(x: T): NonNullable<T>;
|
||||
enum E { A, B }
|
||||
const a = f(E.A);
|
||||
const b: E.A = a;
|
||||
|
||||
Reference in New Issue
Block a user