Files
902a32bb2e Fix panic when inferring [...rest, ...T] from tuple shorter than fixed-arity constraint (#3917)
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: jakebailey <[email protected]>
Co-authored-by: ahejlsberg <[email protected]>
2026-05-18 17:37:29 +00:00

20 lines
505 B
TypeScript

//// [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([])
//// [inferRestTupleShortSource.js]
"use strict";
// Regression test: tsgo panics when inferring [...rest, ...T] from a tuple shorter than fixed-arity constraint
function f(args) {
// ...
}
f([]);