TypeScript/tests/baselines/reference/callWithSpread5.symbols
Nathan Shively-Sanders 004b3ae018
Simplify arity errors, rewording spread errors (#43855)
* Scribbles + tests

The second test actually requires node types

* Basically working

The two simple fixes, in arity error reporting, are in, and the
simplification of arity error reporting is half-done. I haven't started
on any improvements to call assignability.

* trim out too-real test case

* Finish cleanup

And reword error a little.

* Simplify and reword spread errors

* handle spreads first

* update baselines

* Address PR comments
2021-04-29 14:38:50 -07:00

28 lines
1 KiB
Plaintext

=== tests/cases/conformance/expressions/functionCalls/callWithSpread5.ts ===
declare const x: number
>x : Symbol(x, Decl(callWithSpread5.ts, 0, 13))
declare const nnnu: [number, number, number?]
>nnnu : Symbol(nnnu, Decl(callWithSpread5.ts, 1, 13))
declare const nntnnnt: [number, number] | [number, number, number]
>nntnnnt : Symbol(nntnnnt, Decl(callWithSpread5.ts, 2, 13))
declare function fn(a: number, b: number, bb: number, ...c: number[]): number
>fn : Symbol(fn, Decl(callWithSpread5.ts, 2, 66))
>a : Symbol(a, Decl(callWithSpread5.ts, 3, 20))
>b : Symbol(b, Decl(callWithSpread5.ts, 3, 30))
>bb : Symbol(bb, Decl(callWithSpread5.ts, 3, 41))
>c : Symbol(c, Decl(callWithSpread5.ts, 3, 53))
fn(...nnnu, x)
>fn : Symbol(fn, Decl(callWithSpread5.ts, 2, 66))
>nnnu : Symbol(nnnu, Decl(callWithSpread5.ts, 1, 13))
>x : Symbol(x, Decl(callWithSpread5.ts, 0, 13))
fn(...nntnnnt, x)
>fn : Symbol(fn, Decl(callWithSpread5.ts, 2, 66))
>nntnnnt : Symbol(nntnnnt, Decl(callWithSpread5.ts, 2, 13))
>x : Symbol(x, Decl(callWithSpread5.ts, 0, 13))