|
| 1 | +=== tests/cases/compiler/genericFunctionsNotContextSensitive.ts === |
| 2 | +// Repro from #37110 |
| 3 | + |
| 4 | +const f = <F extends (...args: any[]) => <G>(x: G) => void>(_: F): F => _; |
| 5 | +>f : Symbol(f, Decl(genericFunctionsNotContextSensitive.ts, 2, 5)) |
| 6 | +>F : Symbol(F, Decl(genericFunctionsNotContextSensitive.ts, 2, 11)) |
| 7 | +>args : Symbol(args, Decl(genericFunctionsNotContextSensitive.ts, 2, 22)) |
| 8 | +>G : Symbol(G, Decl(genericFunctionsNotContextSensitive.ts, 2, 42)) |
| 9 | +>x : Symbol(x, Decl(genericFunctionsNotContextSensitive.ts, 2, 45)) |
| 10 | +>G : Symbol(G, Decl(genericFunctionsNotContextSensitive.ts, 2, 42)) |
| 11 | +>_ : Symbol(_, Decl(genericFunctionsNotContextSensitive.ts, 2, 60)) |
| 12 | +>F : Symbol(F, Decl(genericFunctionsNotContextSensitive.ts, 2, 11)) |
| 13 | +>F : Symbol(F, Decl(genericFunctionsNotContextSensitive.ts, 2, 11)) |
| 14 | +>_ : Symbol(_, Decl(genericFunctionsNotContextSensitive.ts, 2, 60)) |
| 15 | + |
| 16 | +const a = f(<K extends string>(_: K) => _ => ({})); // <K extends string>(_: K) => <G>(_: G) => {} |
| 17 | +>a : Symbol(a, Decl(genericFunctionsNotContextSensitive.ts, 4, 5)) |
| 18 | +>f : Symbol(f, Decl(genericFunctionsNotContextSensitive.ts, 2, 5)) |
| 19 | +>K : Symbol(K, Decl(genericFunctionsNotContextSensitive.ts, 4, 13)) |
| 20 | +>_ : Symbol(_, Decl(genericFunctionsNotContextSensitive.ts, 4, 31)) |
| 21 | +>K : Symbol(K, Decl(genericFunctionsNotContextSensitive.ts, 4, 13)) |
| 22 | +>_ : Symbol(_, Decl(genericFunctionsNotContextSensitive.ts, 4, 39)) |
| 23 | + |
0 commit comments