Skip to content

Commit de2fb95

Browse files
committed
Add regression test
1 parent d7f8f00 commit de2fb95

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/cases/conformance/types/literal/literalTypeWidening.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,3 +134,10 @@ function test<T extends { a: string, b: string }>(obj: T): T {
134134
let { a, ...rest } = obj;
135135
return { a: 'hello', ...rest } as T;
136136
}
137+
138+
// Repro from #32169
139+
140+
declare function f<T>(x: T): NonNullable<T>;
141+
enum E { A, B }
142+
const a = f(E.A);
143+
const b: E.A = a;

0 commit comments

Comments
 (0)