mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-10 21:07:52 -05:00
Accept baselines and fix test comments
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors1.ts(1,9): error TS1016: A required parameter cannot follow an optional parameter.
|
||||
tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors1.ts(2,8): error TS1047: A rest parameter cannot be optional.
|
||||
tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors1.ts(4,5): error TS1048: A rest parameter cannot have an initializer.
|
||||
tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors1.ts(7,12): error TS1016: A required parameter cannot follow an optional parameter.
|
||||
|
||||
|
||||
==== tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors1.ts (4 errors) ====
|
||||
==== tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors1.ts (3 errors) ====
|
||||
(arg1?, arg2) => 101;
|
||||
~~~~
|
||||
!!! error TS1016: A required parameter cannot follow an optional parameter.
|
||||
@@ -16,7 +15,5 @@ tests/cases/compiler/fatarrowfunctionsOptionalArgsErrors1.ts(7,12): error TS1016
|
||||
~~~
|
||||
!!! error TS1048: A rest parameter cannot have an initializer.
|
||||
|
||||
// Non optional parameter following an optional one
|
||||
(arg1 = 1, arg2) => 1;
|
||||
~~~~
|
||||
!!! error TS1016: A required parameter cannot follow an optional parameter.
|
||||
// Uninitialized parameter makes the initialized one required
|
||||
(arg1 = 1, arg2) => 1;
|
||||
@@ -4,7 +4,7 @@
|
||||
(...arg) => 103;
|
||||
(...arg:number [] = []) => 104;
|
||||
|
||||
// Non optional parameter following an optional one
|
||||
// Uninitialized parameter makes the initialized one required
|
||||
(arg1 = 1, arg2) => 1;
|
||||
|
||||
//// [fatarrowfunctionsOptionalArgsErrors1.js]
|
||||
@@ -30,7 +30,7 @@
|
||||
}
|
||||
return 104;
|
||||
});
|
||||
// Non optional parameter following an optional one
|
||||
// Uninitialized parameter makes the initialized one required
|
||||
(function (arg1, arg2) {
|
||||
if (arg1 === void 0) { arg1 = 1; }
|
||||
return 1;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
tests/cases/compiler/optionalParamArgsTest.ts(31,12): error TS2393: Duplicate function implementation.
|
||||
tests/cases/compiler/optionalParamArgsTest.ts(35,12): error TS2393: Duplicate function implementation.
|
||||
tests/cases/compiler/optionalParamArgsTest.ts(35,47): error TS1016: A required parameter cannot follow an optional parameter.
|
||||
tests/cases/compiler/optionalParamArgsTest.ts(34,12): error TS2393: Duplicate function implementation.
|
||||
tests/cases/compiler/optionalParamArgsTest.ts(98,1): error TS2346: Supplied parameters do not match any signature of call target.
|
||||
tests/cases/compiler/optionalParamArgsTest.ts(99,1): error TS2346: Supplied parameters do not match any signature of call target.
|
||||
tests/cases/compiler/optionalParamArgsTest.ts(100,1): error TS2346: Supplied parameters do not match any signature of call target.
|
||||
tests/cases/compiler/optionalParamArgsTest.ts(101,1): error TS2346: Supplied parameters do not match any signature of call target.
|
||||
@@ -20,10 +20,9 @@ tests/cases/compiler/optionalParamArgsTest.ts(114,1): error TS2346: Supplied par
|
||||
tests/cases/compiler/optionalParamArgsTest.ts(115,1): error TS2346: Supplied parameters do not match any signature of call target.
|
||||
tests/cases/compiler/optionalParamArgsTest.ts(116,1): error TS2346: Supplied parameters do not match any signature of call target.
|
||||
tests/cases/compiler/optionalParamArgsTest.ts(117,1): error TS2346: Supplied parameters do not match any signature of call target.
|
||||
tests/cases/compiler/optionalParamArgsTest.ts(118,1): error TS2346: Supplied parameters do not match any signature of call target.
|
||||
|
||||
|
||||
==== tests/cases/compiler/optionalParamArgsTest.ts (23 errors) ====
|
||||
==== tests/cases/compiler/optionalParamArgsTest.ts (22 errors) ====
|
||||
// Optional parameter and default argument tests
|
||||
|
||||
// Key:
|
||||
@@ -58,13 +57,10 @@ tests/cases/compiler/optionalParamArgsTest.ts(118,1): error TS2346: Supplied par
|
||||
~~~~
|
||||
!!! error TS2393: Duplicate function implementation.
|
||||
|
||||
// Negative test
|
||||
// "Optional parameters may only be followed by other optional parameters"
|
||||
// Uninitialized parameter makes the initialized one required
|
||||
public C1M5(C1M5A1:number,C1M5A2:number=0,C1M5A3:number) { return C1M5A1 + C1M5A2; }
|
||||
~~~~
|
||||
!!! error TS2393: Duplicate function implementation.
|
||||
~~~~~~
|
||||
!!! error TS1016: A required parameter cannot follow an optional parameter.
|
||||
}
|
||||
|
||||
class C2 extends C1 {
|
||||
|
||||
@@ -31,8 +31,7 @@ class C1 {
|
||||
|
||||
public C1M5(C1M5A1:number,C1M5A2:number=0,C1M5A3?:number) { return C1M5A1 + C1M5A2; }
|
||||
|
||||
// Negative test
|
||||
// "Optional parameters may only be followed by other optional parameters"
|
||||
// Uninitialized parameter makes the initialized one required
|
||||
public C1M5(C1M5A1:number,C1M5A2:number=0,C1M5A3:number) { return C1M5A1 + C1M5A2; }
|
||||
}
|
||||
|
||||
@@ -152,8 +151,7 @@ var C1 = (function () {
|
||||
if (C1M5A2 === void 0) { C1M5A2 = 0; }
|
||||
return C1M5A1 + C1M5A2;
|
||||
};
|
||||
// Negative test
|
||||
// "Optional parameters may only be followed by other optional parameters"
|
||||
// Uninitialized parameter makes the initialized one required
|
||||
C1.prototype.C1M5 = function (C1M5A1, C1M5A2, C1M5A3) {
|
||||
if (C1M5A2 === void 0) { C1M5A2 = 0; }
|
||||
return C1M5A1 + C1M5A2;
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
(...arg) => 103;
|
||||
(...arg:number [] = []) => 104;
|
||||
|
||||
// Non optional parameter following an optional one
|
||||
// Uninitialized parameter makes the initialized one required
|
||||
(arg1 = 1, arg2) => 1;
|
||||
@@ -30,8 +30,7 @@ class C1 {
|
||||
|
||||
public C1M5(C1M5A1:number,C1M5A2:number=0,C1M5A3?:number) { return C1M5A1 + C1M5A2; }
|
||||
|
||||
// Negative test
|
||||
// "Optional parameters may only be followed by other optional parameters"
|
||||
// Uninitialized parameter makes the initialized one required
|
||||
public C1M5(C1M5A1:number,C1M5A2:number=0,C1M5A3:number) { return C1M5A1 + C1M5A2; }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user