From cefcc668a881a52b71db6e601ba70c00f1c36332 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders Date: Mon, 15 May 2017 10:55:58 -0700 Subject: [PATCH] Correct test argument in callwithSpread2 --- tests/baselines/reference/callWithSpread2.errors.txt | 9 +++------ tests/baselines/reference/callWithSpread2.js | 4 ++-- .../expressions/functionCalls/callWithSpread2.ts | 2 +- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/tests/baselines/reference/callWithSpread2.errors.txt b/tests/baselines/reference/callWithSpread2.errors.txt index 770e33c9ae9..cfea427a2a7 100644 --- a/tests/baselines/reference/callWithSpread2.errors.txt +++ b/tests/baselines/reference/callWithSpread2.errors.txt @@ -11,12 +11,11 @@ tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts(34,11): err tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts(35,11): error TS2345: Argument of type 'string | number' is not assignable to parameter of type 'number'. Type 'string' is not assignable to type 'number'. tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts(36,1): error TS2346: Supplied parameters do not match any signature of call target. -tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts(36,11): error TS2461: Type '(a?: number, b?: number) => void' is not an array type. tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts(37,1): error TS2346: Supplied parameters do not match any signature of call target. tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts(38,1): error TS2346: Supplied parameters do not match any signature of call target. -==== tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts (10 errors) ==== +==== tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts (9 errors) ==== declare function all(a?: number, b?: number): void; declare function weird(a?: number | string, b?: number | string): void; declare function prefix(s: string, a?: number, b?: number): void; @@ -70,11 +69,9 @@ tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts(38,1): erro ~~~~~~~~ !!! error TS2345: Argument of type 'string | number' is not assignable to parameter of type 'number'. !!! error TS2345: Type 'string' is not assignable to type 'number'. - prefix(...all) // required parameters are required - ~~~~~~~~~~~~~~ + prefix(...ns) // required parameters are required + ~~~~~~~~~~~~~ !!! error TS2346: Supplied parameters do not match any signature of call target. - ~~~ -!!! error TS2461: Type '(a?: number, b?: number) => void' is not an array type. prefix(...mixed) ~~~~~~~~~~~~~~~~ !!! error TS2346: Supplied parameters do not match any signature of call target. diff --git a/tests/baselines/reference/callWithSpread2.js b/tests/baselines/reference/callWithSpread2.js index 0380c69f80f..55296d924f7 100644 --- a/tests/baselines/reference/callWithSpread2.js +++ b/tests/baselines/reference/callWithSpread2.js @@ -34,7 +34,7 @@ prefix("b", ...mixed) prefix("c", ...tuple) rest("e", ...mixed) rest("f", ...tuple) -prefix(...all) // required parameters are required +prefix(...ns) // required parameters are required prefix(...mixed) prefix(...tuple) @@ -61,6 +61,6 @@ prefix.apply(void 0, ["b"].concat(mixed)); prefix.apply(void 0, ["c"].concat(tuple)); rest.apply(void 0, ["e"].concat(mixed)); rest.apply(void 0, ["f"].concat(tuple)); -prefix.apply(void 0, all); // required parameters are required +prefix.apply(void 0, ns); // required parameters are required prefix.apply(void 0, mixed); prefix.apply(void 0, tuple); diff --git a/tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts b/tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts index 07441dc74bf..9151f52f00d 100644 --- a/tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts +++ b/tests/cases/conformance/expressions/functionCalls/callWithSpread2.ts @@ -33,6 +33,6 @@ prefix("b", ...mixed) prefix("c", ...tuple) rest("e", ...mixed) rest("f", ...tuple) -prefix(...all) // required parameters are required +prefix(...ns) // required parameters are required prefix(...mixed) prefix(...tuple)