|
| 1 | +=== tests/cases/compiler/freshLiteralTypesInIntersections.ts === |
| 2 | +// Repro from #19657 |
| 3 | + |
| 4 | +declare function func<A extends string, B extends A>(a: A, b: B[]): (ab: A & B) => void; |
| 5 | +>func : Symbol(func, Decl(freshLiteralTypesInIntersections.ts, 0, 0)) |
| 6 | +>A : Symbol(A, Decl(freshLiteralTypesInIntersections.ts, 2, 22)) |
| 7 | +>B : Symbol(B, Decl(freshLiteralTypesInIntersections.ts, 2, 39)) |
| 8 | +>A : Symbol(A, Decl(freshLiteralTypesInIntersections.ts, 2, 22)) |
| 9 | +>a : Symbol(a, Decl(freshLiteralTypesInIntersections.ts, 2, 53)) |
| 10 | +>A : Symbol(A, Decl(freshLiteralTypesInIntersections.ts, 2, 22)) |
| 11 | +>b : Symbol(b, Decl(freshLiteralTypesInIntersections.ts, 2, 58)) |
| 12 | +>B : Symbol(B, Decl(freshLiteralTypesInIntersections.ts, 2, 39)) |
| 13 | +>ab : Symbol(ab, Decl(freshLiteralTypesInIntersections.ts, 2, 69)) |
| 14 | +>A : Symbol(A, Decl(freshLiteralTypesInIntersections.ts, 2, 22)) |
| 15 | +>B : Symbol(B, Decl(freshLiteralTypesInIntersections.ts, 2, 39)) |
| 16 | + |
| 17 | +const q = func("x" as "x" | "y", ["x"]); |
| 18 | +>q : Symbol(q, Decl(freshLiteralTypesInIntersections.ts, 3, 5)) |
| 19 | +>func : Symbol(func, Decl(freshLiteralTypesInIntersections.ts, 0, 0)) |
| 20 | + |
| 21 | +q("x"); |
| 22 | +>q : Symbol(q, Decl(freshLiteralTypesInIntersections.ts, 3, 5)) |
| 23 | + |
0 commit comments