Skip to content

Commit fbb7940

Browse files
committed
Accept new baselines
1 parent 2e52498 commit fbb7940

22 files changed

+117
-117
lines changed

tests/baselines/reference/declarationEmitDestructuringArrayPattern2.errors.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
tests/cases/compiler/declarationEmitDestructuringArrayPattern2.ts(4,6): error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
2-
tests/cases/compiler/declarationEmitDestructuringArrayPattern2.ts(4,11): error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
3-
tests/cases/compiler/declarationEmitDestructuringArrayPattern2.ts(4,16): error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
1+
tests/cases/compiler/declarationEmitDestructuringArrayPattern2.ts(4,6): error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
2+
tests/cases/compiler/declarationEmitDestructuringArrayPattern2.ts(4,11): error TS2493: Tuple type '[]' of length '0' has no element at index '1'.
3+
tests/cases/compiler/declarationEmitDestructuringArrayPattern2.ts(4,16): error TS2493: Tuple type '[]' of length '0' has no element at index '2'.
44

55

66
==== tests/cases/compiler/declarationEmitDestructuringArrayPattern2.ts (3 errors) ====
@@ -9,11 +9,11 @@ tests/cases/compiler/declarationEmitDestructuringArrayPattern2.ts(4,16): error T
99
var [x11 = 0, y11 = ""] = [1, "hello"];
1010
var [a11, b11, c11] = [];
1111
~~~
12-
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
12+
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
1313
~~~
14-
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
14+
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '1'.
1515
~~~
16-
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
16+
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '2'.
1717

1818
var [a2, [b2, { x12, y12: c2 }]=["abc", { x12: 10, y12: false }]] = [1, ["hello", { x12: 5, y12: true }]];
1919

tests/baselines/reference/declarationEmitDestructuringArrayPattern2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ var _m = [[x13, y13], { x: x13, y: y13 }], a3 = _m[0], b3 = _m[1];
2222
//// [declarationEmitDestructuringArrayPattern2.d.ts]
2323
declare var x10: number, y10: string, z10: boolean;
2424
declare var x11: number, y11: string;
25-
declare var a11: any, b11: any, c11: any;
25+
declare var a11: undefined, b11: undefined, c11: undefined;
2626
declare var a2: number, b2: string, x12: number, c2: boolean;
2727
declare var x13: number, y13: string;
2828
declare var a3: (string | number)[], b3: {

tests/baselines/reference/declarationEmitDestructuringArrayPattern2.types

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ var [x11 = 0, y11 = ""] = [1, "hello"];
2020
>"hello" : "hello"
2121

2222
var [a11, b11, c11] = [];
23-
>a11 : any
24-
>b11 : any
25-
>c11 : any
26-
>[] : [undefined?, undefined?, undefined?]
23+
>a11 : undefined
24+
>b11 : undefined
25+
>c11 : undefined
26+
>[] : []
2727

2828
var [a2, [b2, { x12, y12: c2 }]=["abc", { x12: 10, y12: false }]] = [1, ["hello", { x12: 5, y12: true }]];
2929
>a2 : number

tests/baselines/reference/declarationsAndAssignments.errors.txt

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(5,16): error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
1+
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(5,16): error TS2493: Tuple type '[number, string]' of length '2' has no element at index '2'.
22
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(22,17): error TS2353: Object literal may only specify known properties, and 'x' does not exist in type '{}'.
33
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(22,23): error TS2353: Object literal may only specify known properties, and 'y' does not exist in type '{}'.
44
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(23,25): error TS2353: Object literal may only specify known properties, and 'y' does not exist in type '{ x: any; }'.
55
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(24,19): error TS2353: Object literal may only specify known properties, and 'x' does not exist in type '{ y: any; }'.
66
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(28,28): error TS2353: Object literal may only specify known properties, and 'y' does not exist in type '{ x: any; }'.
77
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(29,22): error TS2353: Object literal may only specify known properties, and 'x' does not exist in type '{ y: any; }'.
88
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(58,9): error TS2403: Subsequent variable declarations must have the same type. Variable 'y' must be of type 'string | number', but here has type 'string'.
9-
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(62,10): error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
10-
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(62,13): error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
11-
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(62,16): error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
12-
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(63,13): error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
13-
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(63,16): error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
9+
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(62,10): error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
10+
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(62,13): error TS2493: Tuple type '[]' of length '0' has no element at index '1'.
11+
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(62,16): error TS2493: Tuple type '[]' of length '0' has no element at index '2'.
12+
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(63,13): error TS2493: Tuple type '[number]' of length '1' has no element at index '1'.
13+
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(63,16): error TS2493: Tuple type '[number]' of length '1' has no element at index '2'.
1414
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(67,9): error TS2461: Type '{}' is not an array type.
1515
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(68,9): error TS2461: Type '{ 0: number; 1: number; }' is not an array type.
1616
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(73,11): error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
@@ -29,7 +29,7 @@ tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(138,9):
2929
var [x, y] = [1, "hello"];
3030
var [x, y, z] = [1, "hello"];
3131
~
32-
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
32+
!!! error TS2493: Tuple type '[number, string]' of length '2' has no element at index '2'.
3333
var [,, x] = [0, 1, 2];
3434
var x: number;
3535
var y: string;
@@ -103,16 +103,16 @@ tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(138,9):
103103
function f8() {
104104
var [a, b, c] = []; // Error, [] is an empty tuple
105105
~
106-
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
106+
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
107107
~
108-
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
108+
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '1'.
109109
~
110-
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
110+
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '2'.
111111
var [d, e, f] = [1]; // Error, [1] is a tuple
112112
~
113-
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
113+
!!! error TS2493: Tuple type '[number]' of length '1' has no element at index '1'.
114114
~
115-
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
115+
!!! error TS2493: Tuple type '[number]' of length '1' has no element at index '2'.
116116
}
117117

118118
function f9() {

tests/baselines/reference/declarationsAndAssignments.types

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ function f0() {
2323
var [x, y, z] = [1, "hello"];
2424
>x : number
2525
>y : string
26-
>z : any
27-
>[1, "hello"] : [number, string, undefined?]
26+
>z : undefined
27+
>[1, "hello"] : [number, string]
2828
>1 : 1
2929
>"hello" : "hello"
3030

@@ -255,16 +255,16 @@ function f8() {
255255
>f8 : () => void
256256

257257
var [a, b, c] = []; // Error, [] is an empty tuple
258-
>a : any
259-
>b : any
260-
>c : any
261-
>[] : [undefined?, undefined?, undefined?]
258+
>a : undefined
259+
>b : undefined
260+
>c : undefined
261+
>[] : []
262262

263263
var [d, e, f] = [1]; // Error, [1] is a tuple
264264
>d : number
265-
>e : any
266-
>f : any
267-
>[1] : [number, undefined?, undefined?]
265+
>e : undefined
266+
>f : undefined
267+
>[1] : [number]
268268
>1 : 1
269269
}
270270

tests/baselines/reference/destructuringArrayBindingPatternAndAssignment1ES5.errors.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES5.ts(43,6): error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
2-
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES5.ts(44,8): error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
3-
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES5.ts(44,18): error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
1+
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES5.ts(43,6): error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
2+
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES5.ts(44,8): error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
3+
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES5.ts(44,18): error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
44

55

66
==== tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES5.ts (3 errors) ====
@@ -48,12 +48,12 @@ tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAss
4848
var [c0, c1] = [...temp];
4949
var [c2] = [];
5050
~~
51-
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
51+
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
5252
var [[[c3]], [[[[c4]]]]] = [[[]], [[[[]]]]]
5353
~~
54-
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
54+
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
5555
~~
56-
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
56+
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
5757
var [[c5], c6]: [[string|number], boolean] = [[1], true];
5858
var [, c7] = [1, 2, 3];
5959
var [,,, c8] = [1, 2, 3, 4];

tests/baselines/reference/destructuringArrayBindingPatternAndAssignment1ES5.types

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -92,19 +92,19 @@ var [c0, c1] = [...temp];
9292
>temp : number[]
9393

9494
var [c2] = [];
95-
>c2 : any
96-
>[] : [undefined?]
95+
>c2 : undefined
96+
>[] : []
9797

9898
var [[[c3]], [[[[c4]]]]] = [[[]], [[[[]]]]]
99-
>c3 : any
100-
>c4 : any
101-
>[[[]], [[[[]]]]] : [[[undefined?]], [[[[undefined?]]]]]
102-
>[[]] : [[undefined?]]
103-
>[] : [undefined?]
104-
>[[[[]]]] : [[[[undefined?]]]]
105-
>[[[]]] : [[[undefined?]]]
106-
>[[]] : [[undefined?]]
107-
>[] : [undefined?]
99+
>c3 : undefined
100+
>c4 : undefined
101+
>[[[]], [[[[]]]]] : [[[]], [[[[]]]]]
102+
>[[]] : [[]]
103+
>[] : []
104+
>[[[[]]]] : [[[[]]]]
105+
>[[[]]] : [[[]]]
106+
>[[]] : [[]]
107+
>[] : []
108108

109109
var [[c5], c6]: [[string|number], boolean] = [[1], true];
110110
>c5 : string | number

tests/baselines/reference/destructuringArrayBindingPatternAndAssignment1ES5iterable.errors.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES5iterable.ts(43,6): error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
2-
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES5iterable.ts(44,8): error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
3-
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES5iterable.ts(44,18): error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
1+
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES5iterable.ts(43,6): error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
2+
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES5iterable.ts(44,8): error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
3+
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES5iterable.ts(44,18): error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
44

55

66
==== tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES5iterable.ts (3 errors) ====
@@ -48,12 +48,12 @@ tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAss
4848
var [c0, c1] = [...temp];
4949
var [c2] = [];
5050
~~
51-
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
51+
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
5252
var [[[c3]], [[[[c4]]]]] = [[[]], [[[[]]]]]
5353
~~
54-
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
54+
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
5555
~~
56-
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
56+
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
5757
var [[c5], c6]: [[string|number], boolean] = [[1], true];
5858
var [, c7] = [1, 2, 3];
5959
var [,,, c8] = [1, 2, 3, 4];

tests/baselines/reference/destructuringArrayBindingPatternAndAssignment1ES5iterable.types

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -92,19 +92,19 @@ var [c0, c1] = [...temp];
9292
>temp : number[]
9393

9494
var [c2] = [];
95-
>c2 : any
96-
>[] : [undefined?]
95+
>c2 : undefined
96+
>[] : []
9797

9898
var [[[c3]], [[[[c4]]]]] = [[[]], [[[[]]]]]
99-
>c3 : any
100-
>c4 : any
101-
>[[[]], [[[[]]]]] : [[[undefined?]], [[[[undefined?]]]]]
102-
>[[]] : [[undefined?]]
103-
>[] : [undefined?]
104-
>[[[[]]]] : [[[[undefined?]]]]
105-
>[[[]]] : [[[undefined?]]]
106-
>[[]] : [[undefined?]]
107-
>[] : [undefined?]
99+
>c3 : undefined
100+
>c4 : undefined
101+
>[[[]], [[[[]]]]] : [[[]], [[[[]]]]]
102+
>[[]] : [[]]
103+
>[] : []
104+
>[[[[]]]] : [[[[]]]]
105+
>[[[]]] : [[[]]]
106+
>[[]] : [[]]
107+
>[] : []
108108

109109
var [[c5], c6]: [[string|number], boolean] = [[1], true];
110110
>c5 : string | number

tests/baselines/reference/destructuringArrayBindingPatternAndAssignment1ES6.errors.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES6.ts(43,6): error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
2-
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES6.ts(44,8): error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
3-
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES6.ts(44,18): error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
1+
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES6.ts(43,6): error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
2+
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES6.ts(44,8): error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
3+
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES6.ts(44,18): error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
44

55

66
==== tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES6.ts (3 errors) ====
@@ -48,12 +48,12 @@ tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAss
4848
var [c0, c1] = [...temp];
4949
var [c2] = [];
5050
~~
51-
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
51+
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
5252
var [[[c3]], [[[[c4]]]]] = [[[]], [[[[]]]]]
5353
~~
54-
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
54+
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
5555
~~
56-
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
56+
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
5757
var [[c5], c6]: [[string|number], boolean] = [[1], true];
5858
var [, c7] = [1, 2, 3];
5959
var [,,, c8] = [1, 2, 3, 4];

tests/baselines/reference/destructuringArrayBindingPatternAndAssignment1ES6.types

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -92,19 +92,19 @@ var [c0, c1] = [...temp];
9292
>temp : number[]
9393

9494
var [c2] = [];
95-
>c2 : any
96-
>[] : [undefined?]
95+
>c2 : undefined
96+
>[] : []
9797

9898
var [[[c3]], [[[[c4]]]]] = [[[]], [[[[]]]]]
99-
>c3 : any
100-
>c4 : any
101-
>[[[]], [[[[]]]]] : [[[undefined?]], [[[[undefined?]]]]]
102-
>[[]] : [[undefined?]]
103-
>[] : [undefined?]
104-
>[[[[]]]] : [[[[undefined?]]]]
105-
>[[[]]] : [[[undefined?]]]
106-
>[[]] : [[undefined?]]
107-
>[] : [undefined?]
99+
>c3 : undefined
100+
>c4 : undefined
101+
>[[[]], [[[[]]]]] : [[[]], [[[[]]]]]
102+
>[[]] : [[]]
103+
>[] : []
104+
>[[[[]]]] : [[[[]]]]
105+
>[[[]]] : [[[]]]
106+
>[[]] : [[]]
107+
>[] : []
108108

109109
var [[c5], c6]: [[string|number], boolean] = [[1], true];
110110
>c5 : string | number

0 commit comments

Comments
 (0)