mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
902a32bb2e
Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: jakebailey <[email protected]> Co-authored-by: ahejlsberg <[email protected]>
18 lines
604 B
Plaintext
18 lines
604 B
Plaintext
//// [tests/cases/compiler/inferRestTupleShortSource.ts] ////
|
|
|
|
=== inferRestTupleShortSource.ts ===
|
|
// Regression test: tsgo panics when inferring [...rest, ...T] from a tuple shorter than fixed-arity constraint
|
|
|
|
function f<T extends [string]>(args: [...string[], ...T]) {
|
|
>f : Symbol(f, Decl(inferRestTupleShortSource.ts, 0, 0))
|
|
>T : Symbol(T, Decl(inferRestTupleShortSource.ts, 2, 11))
|
|
>args : Symbol(args, Decl(inferRestTupleShortSource.ts, 2, 31))
|
|
>T : Symbol(T, Decl(inferRestTupleShortSource.ts, 2, 11))
|
|
|
|
// ...
|
|
}
|
|
|
|
f([])
|
|
>f : Symbol(f, Decl(inferRestTupleShortSource.ts, 0, 0))
|
|
|