Accept new baselines

This commit is contained in:
Anders Hejlsberg
2019-06-28 16:54:55 -10:00
parent 2e5249835d
commit fbb79400bb
22 changed files with 117 additions and 117 deletions
@@ -1,6 +1,6 @@
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.
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.
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.
tests/cases/compiler/declarationEmitDestructuringArrayPattern2.ts(4,6): error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
tests/cases/compiler/declarationEmitDestructuringArrayPattern2.ts(4,11): error TS2493: Tuple type '[]' of length '0' has no element at index '1'.
tests/cases/compiler/declarationEmitDestructuringArrayPattern2.ts(4,16): error TS2493: Tuple type '[]' of length '0' has no element at index '2'.
==== tests/cases/compiler/declarationEmitDestructuringArrayPattern2.ts (3 errors) ====
@@ -9,11 +9,11 @@ tests/cases/compiler/declarationEmitDestructuringArrayPattern2.ts(4,16): error T
var [x11 = 0, y11 = ""] = [1, "hello"];
var [a11, b11, c11] = [];
~~~
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
~~~
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '1'.
~~~
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '2'.
var [a2, [b2, { x12, y12: c2 }]=["abc", { x12: 10, y12: false }]] = [1, ["hello", { x12: 5, y12: true }]];
@@ -22,7 +22,7 @@ var _m = [[x13, y13], { x: x13, y: y13 }], a3 = _m[0], b3 = _m[1];
//// [declarationEmitDestructuringArrayPattern2.d.ts]
declare var x10: number, y10: string, z10: boolean;
declare var x11: number, y11: string;
declare var a11: any, b11: any, c11: any;
declare var a11: undefined, b11: undefined, c11: undefined;
declare var a2: number, b2: string, x12: number, c2: boolean;
declare var x13: number, y13: string;
declare var a3: (string | number)[], b3: {
@@ -20,10 +20,10 @@ var [x11 = 0, y11 = ""] = [1, "hello"];
>"hello" : "hello"
var [a11, b11, c11] = [];
>a11 : any
>b11 : any
>c11 : any
>[] : [undefined?, undefined?, undefined?]
>a11 : undefined
>b11 : undefined
>c11 : undefined
>[] : []
var [a2, [b2, { x12, y12: c2 }]=["abc", { x12: 10, y12: false }]] = [1, ["hello", { x12: 5, y12: true }]];
>a2 : number
@@ -1,4 +1,4 @@
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.
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(5,16): error TS2493: Tuple type '[number, string]' of length '2' has no element at index '2'.
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 '{}'.
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 '{}'.
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; }'.
@@ -6,11 +6,11 @@ tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(24,19):
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; }'.
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; }'.
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'.
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.
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.
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.
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.
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.
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(62,10): error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(62,13): error TS2493: Tuple type '[]' of length '0' has no element at index '1'.
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(62,16): error TS2493: Tuple type '[]' of length '0' has no element at index '2'.
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(63,13): error TS2493: Tuple type '[number]' of length '1' has no element at index '1'.
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(63,16): error TS2493: Tuple type '[number]' of length '1' has no element at index '2'.
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(67,9): error TS2461: Type '{}' is not an array type.
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(68,9): error TS2461: Type '{ 0: number; 1: number; }' is not an array type.
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):
var [x, y] = [1, "hello"];
var [x, y, z] = [1, "hello"];
~
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
!!! error TS2493: Tuple type '[number, string]' of length '2' has no element at index '2'.
var [,, x] = [0, 1, 2];
var x: number;
var y: string;
@@ -103,16 +103,16 @@ tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(138,9):
function f8() {
var [a, b, c] = []; // Error, [] is an empty tuple
~
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
~
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '1'.
~
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '2'.
var [d, e, f] = [1]; // Error, [1] is a tuple
~
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
!!! error TS2493: Tuple type '[number]' of length '1' has no element at index '1'.
~
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
!!! error TS2493: Tuple type '[number]' of length '1' has no element at index '2'.
}
function f9() {
@@ -23,8 +23,8 @@ function f0() {
var [x, y, z] = [1, "hello"];
>x : number
>y : string
>z : any
>[1, "hello"] : [number, string, undefined?]
>z : undefined
>[1, "hello"] : [number, string]
>1 : 1
>"hello" : "hello"
@@ -255,16 +255,16 @@ function f8() {
>f8 : () => void
var [a, b, c] = []; // Error, [] is an empty tuple
>a : any
>b : any
>c : any
>[] : [undefined?, undefined?, undefined?]
>a : undefined
>b : undefined
>c : undefined
>[] : []
var [d, e, f] = [1]; // Error, [1] is a tuple
>d : number
>e : any
>f : any
>[1] : [number, undefined?, undefined?]
>e : undefined
>f : undefined
>[1] : [number]
>1 : 1
}
@@ -1,6 +1,6 @@
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.
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.
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.
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES5.ts(43,6): error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES5.ts(44,8): error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES5.ts(44,18): error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
==== tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES5.ts (3 errors) ====
@@ -48,12 +48,12 @@ tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAss
var [c0, c1] = [...temp];
var [c2] = [];
~~
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
var [[[c3]], [[[[c4]]]]] = [[[]], [[[[]]]]]
~~
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
~~
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
var [[c5], c6]: [[string|number], boolean] = [[1], true];
var [, c7] = [1, 2, 3];
var [,,, c8] = [1, 2, 3, 4];
@@ -92,19 +92,19 @@ var [c0, c1] = [...temp];
>temp : number[]
var [c2] = [];
>c2 : any
>[] : [undefined?]
>c2 : undefined
>[] : []
var [[[c3]], [[[[c4]]]]] = [[[]], [[[[]]]]]
>c3 : any
>c4 : any
>[[[]], [[[[]]]]] : [[[undefined?]], [[[[undefined?]]]]]
>[[]] : [[undefined?]]
>[] : [undefined?]
>[[[[]]]] : [[[[undefined?]]]]
>[[[]]] : [[[undefined?]]]
>[[]] : [[undefined?]]
>[] : [undefined?]
>c3 : undefined
>c4 : undefined
>[[[]], [[[[]]]]] : [[[]], [[[[]]]]]
>[[]] : [[]]
>[] : []
>[[[[]]]] : [[[[]]]]
>[[[]]] : [[[]]]
>[[]] : [[]]
>[] : []
var [[c5], c6]: [[string|number], boolean] = [[1], true];
>c5 : string | number
@@ -1,6 +1,6 @@
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.
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.
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.
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES5iterable.ts(43,6): error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES5iterable.ts(44,8): error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES5iterable.ts(44,18): error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
==== tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES5iterable.ts (3 errors) ====
@@ -48,12 +48,12 @@ tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAss
var [c0, c1] = [...temp];
var [c2] = [];
~~
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
var [[[c3]], [[[[c4]]]]] = [[[]], [[[[]]]]]
~~
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
~~
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
var [[c5], c6]: [[string|number], boolean] = [[1], true];
var [, c7] = [1, 2, 3];
var [,,, c8] = [1, 2, 3, 4];
@@ -92,19 +92,19 @@ var [c0, c1] = [...temp];
>temp : number[]
var [c2] = [];
>c2 : any
>[] : [undefined?]
>c2 : undefined
>[] : []
var [[[c3]], [[[[c4]]]]] = [[[]], [[[[]]]]]
>c3 : any
>c4 : any
>[[[]], [[[[]]]]] : [[[undefined?]], [[[[undefined?]]]]]
>[[]] : [[undefined?]]
>[] : [undefined?]
>[[[[]]]] : [[[[undefined?]]]]
>[[[]]] : [[[undefined?]]]
>[[]] : [[undefined?]]
>[] : [undefined?]
>c3 : undefined
>c4 : undefined
>[[[]], [[[[]]]]] : [[[]], [[[[]]]]]
>[[]] : [[]]
>[] : []
>[[[[]]]] : [[[[]]]]
>[[[]]] : [[[]]]
>[[]] : [[]]
>[] : []
var [[c5], c6]: [[string|number], boolean] = [[1], true];
>c5 : string | number
@@ -1,6 +1,6 @@
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.
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.
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.
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES6.ts(43,6): error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES6.ts(44,8): error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES6.ts(44,18): error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
==== tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment1ES6.ts (3 errors) ====
@@ -48,12 +48,12 @@ tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAss
var [c0, c1] = [...temp];
var [c2] = [];
~~
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
var [[[c3]], [[[[c4]]]]] = [[[]], [[[[]]]]]
~~
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
~~
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
var [[c5], c6]: [[string|number], boolean] = [[1], true];
var [, c7] = [1, 2, 3];
var [,,, c8] = [1, 2, 3, 4];
@@ -92,19 +92,19 @@ var [c0, c1] = [...temp];
>temp : number[]
var [c2] = [];
>c2 : any
>[] : [undefined?]
>c2 : undefined
>[] : []
var [[[c3]], [[[[c4]]]]] = [[[]], [[[[]]]]]
>c3 : any
>c4 : any
>[[[]], [[[[]]]]] : [[[undefined?]], [[[[undefined?]]]]]
>[[]] : [[undefined?]]
>[] : [undefined?]
>[[[[]]]] : [[[[undefined?]]]]
>[[[]]] : [[[undefined?]]]
>[[]] : [[undefined?]]
>[] : [undefined?]
>c3 : undefined
>c4 : undefined
>[[[]], [[[[]]]]] : [[[]], [[[[]]]]]
>[[]] : [[]]
>[] : []
>[[[[]]]] : [[[[]]]]
>[[[]]] : [[[]]]
>[[]] : [[]]
>[] : []
var [[c5], c6]: [[string|number], boolean] = [[1], true];
>c5 : string | number
@@ -1,7 +1,7 @@
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment2.ts(3,6): error TS2461: Type 'undefined' is not an array type.
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment2.ts(3,6): error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment2.ts(3,6): error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment2.ts(3,12): error TS2461: Type 'undefined' is not an array type.
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment2.ts(3,12): error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment2.ts(3,12): error TS2493: Tuple type '[]' of length '0' has no element at index '1'.
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment2.ts(4,5): error TS2461: Type 'undefined' is not an array type.
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment2.ts(9,51): error TS2322: Type 'number' is not assignable to type 'boolean'.
tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment2.ts(22,5): error TS2739: Type 'number[]' is missing the following properties from type '[number, number]': 0, 1
@@ -16,11 +16,11 @@ tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAss
~~~~
!!! error TS2461: Type 'undefined' is not an array type.
~~~~
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
~~~~~~
!!! error TS2461: Type 'undefined' is not an array type.
~~~~~~
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '1'.
var [[a2], [[a3]]] = undefined // Error
~~~~~~~~~~~~~~
!!! error TS2461: Type 'undefined' is not an array type.
@@ -4,7 +4,7 @@
var [[a0], [[a1]]] = [] // Error
>a0 : any
>a1 : any
>[] : [undefined?, undefined?]
>[] : []
var [[a2], [[a3]]] = undefined // Error
>a2 : any
@@ -3,7 +3,7 @@ const [a, b = a] = [1]; // ok
>a : any
>b : any
>a : any
>[1] : [number, any?]
>[1] : [number]
>1 : 1
const [c, d = c, e = e] = [1]; // error for e = e
@@ -12,7 +12,7 @@ const [c, d = c, e = e] = [1]; // error for e = e
>c : any
>e : any
>e : any
>[1] : [number, any?, any?]
>[1] : [number]
>1 : 1
const [f, g = f, h = i, i = f] = [1]; // error for h = i
@@ -23,7 +23,7 @@ const [f, g = f, h = i, i = f] = [1]; // error for h = i
>i : any
>i : any
>f : any
>[1] : [number, any?, any?, any?]
>[1] : [number]
>1 : 1
(function ([a, b = a]) { // ok
@@ -151,9 +151,9 @@ var {f: [f1, f2, { f3: f4, f5 }, , ]} = { f: [1, 2, { f3: 4, f5: 0 }] };
>f4 : number
>f5 : number
> : undefined
>{ f: [1, 2, { f3: 4, f5: 0 }] } : { f: [number, number, { f3: number; f5: number; }, undefined?]; }
>f : [number, number, { f3: number; f5: number; }, undefined?]
>[1, 2, { f3: 4, f5: 0 }] : [number, number, { f3: number; f5: number; }, undefined?]
>{ f: [1, 2, { f3: 4, f5: 0 }] } : { f: [number, number, { f3: number; f5: number; }]; }
>f : [number, number, { f3: number; f5: number; }]
>[1, 2, { f3: 4, f5: 0 }] : [number, number, { f3: number; f5: number; }]
>1 : 1
>2 : 2
>{ f3: 4, f5: 0 } : { f3: number; f5: number; }
@@ -151,9 +151,9 @@ var {f: [f1, f2, { f3: f4, f5 }, , ]} = { f: [1, 2, { f3: 4, f5: 0 }] };
>f4 : number
>f5 : number
> : undefined
>{ f: [1, 2, { f3: 4, f5: 0 }] } : { f: [number, number, { f3: number; f5: number; }, undefined?]; }
>f : [number, number, { f3: number; f5: number; }, undefined?]
>[1, 2, { f3: 4, f5: 0 }] : [number, number, { f3: number; f5: number; }, undefined?]
>{ f: [1, 2, { f3: 4, f5: 0 }] } : { f: [number, number, { f3: number; f5: number; }]; }
>f : [number, number, { f3: number; f5: number; }]
>[1, 2, { f3: 4, f5: 0 }] : [number, number, { f3: number; f5: number; }]
>1 : 1
>2 : 2
>{ f3: 4, f5: 0 } : { f3: number; f5: number; }
@@ -60,7 +60,7 @@ var [c1, c2, { c3: c4, c5 }, , ...c6] = [1, 2, { c3: 4, c5: 0 }]; // Error
>c5 : number
> : undefined
>c6 : []
>[1, 2, { c3: 4, c5: 0 }] : [number, number, { c3: number; c5: number; }, undefined?]
>[1, 2, { c3: 4, c5: 0 }] : [number, number, { c3: number; c5: number; }]
>1 : 1
>2 : 2
>{ c3: 4, c5: 0 } : { c3: number; c5: number; }
@@ -1,5 +1,5 @@
tests/cases/compiler/downlevelLetConst12.ts(6,6): error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
tests/cases/compiler/downlevelLetConst12.ts(9,8): error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
tests/cases/compiler/downlevelLetConst12.ts(6,6): error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
tests/cases/compiler/downlevelLetConst12.ts(9,8): error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
==== tests/cases/compiler/downlevelLetConst12.ts (2 errors) ====
@@ -10,10 +10,10 @@ tests/cases/compiler/downlevelLetConst12.ts(9,8): error TS2525: Initializer prov
let [baz] = [];
~~~
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
let {a: baz2} = { a: 1 };
const [baz3] = []
~~~~
!!! error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
!!! error TS2493: Tuple type '[]' of length '0' has no element at index '0'.
const {a: baz4} = { a: 1 };
@@ -11,8 +11,8 @@ const bar = 1;
>1 : 1
let [baz] = [];
>baz : any
>[] : [undefined?]
>baz : undefined
>[] : []
let {a: baz2} = { a: 1 };
>a : any
@@ -22,8 +22,8 @@ let {a: baz2} = { a: 1 };
>1 : 1
const [baz3] = []
>baz3 : any
>[] : [undefined?]
>baz3 : undefined
>[] : []
const {a: baz4} = { a: 1 };
>a : any
@@ -44,5 +44,5 @@ var [a4] = [undefined], {b4} = { b4: null }, c4 = undefined, d4 = null; // error
var [a5 = undefined] = []; // error
>a5 : any
>undefined : undefined
>[] : [undefined?]
>[] : []
@@ -49,7 +49,7 @@ for (let [v] of v) { }
let [x2 = x2] = []
>x2 : any
>x2 : any
>[] : [any?]
>[] : []
let z0 = () => z0;
>z0 : () => any
@@ -234,11 +234,11 @@ let multiRobotAInfo: (string | string[])[];
[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = multiRobotB;
>[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = multiRobotB : [string, string[]]
>[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] : [string, [string?, string?]]
>[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] : [string, []]
>nameMB = "helloNoName" : "helloNoName"
>nameMB : string
>"helloNoName" : "helloNoName"
>[primarySkillB = "noSkill", secondarySkillB = "noSkill"] = [] : [string?, string?]
>[primarySkillB = "noSkill", secondarySkillB = "noSkill"] = [] : []
>[primarySkillB = "noSkill", secondarySkillB = "noSkill"] : [string, string]
>primarySkillB = "noSkill" : "noSkill"
>primarySkillB : string
@@ -246,16 +246,16 @@ let multiRobotAInfo: (string | string[])[];
>secondarySkillB = "noSkill" : "noSkill"
>secondarySkillB : string
>"noSkill" : "noSkill"
>[] : [string?, string?]
>[] : []
>multiRobotB : [string, string[]]
[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = getMultiRobotB();
>[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = getMultiRobotB() : [string, string[]]
>[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] : [string, [string?, string?]]
>[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] : [string, []]
>nameMB = "helloNoName" : "helloNoName"
>nameMB : string
>"helloNoName" : "helloNoName"
>[primarySkillB = "noSkill", secondarySkillB = "noSkill"] = [] : [string?, string?]
>[primarySkillB = "noSkill", secondarySkillB = "noSkill"] = [] : []
>[primarySkillB = "noSkill", secondarySkillB = "noSkill"] : [string, string]
>primarySkillB = "noSkill" : "noSkill"
>primarySkillB : string
@@ -263,17 +263,17 @@ let multiRobotAInfo: (string | string[])[];
>secondarySkillB = "noSkill" : "noSkill"
>secondarySkillB : string
>"noSkill" : "noSkill"
>[] : [string?, string?]
>[] : []
>getMultiRobotB() : [string, string[]]
>getMultiRobotB : () => [string, string[]]
[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] =
>[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] = ["trimmer", ["trimming", "edging"]] : [string, [string, string]]
>[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] : [string, [string?, string?]]
>[nameMB = "helloNoName", [primarySkillB = "noSkill", secondarySkillB = "noSkill"] = []] : [string, []]
>nameMB = "helloNoName" : "helloNoName"
>nameMB : string
>"helloNoName" : "helloNoName"
>[primarySkillB = "noSkill", secondarySkillB = "noSkill"] = [] : [string?, string?]
>[primarySkillB = "noSkill", secondarySkillB = "noSkill"] = [] : []
>[primarySkillB = "noSkill", secondarySkillB = "noSkill"] : [string, string]
>primarySkillB = "noSkill" : "noSkill"
>primarySkillB : string
@@ -281,7 +281,7 @@ let multiRobotAInfo: (string | string[])[];
>secondarySkillB = "noSkill" : "noSkill"
>secondarySkillB : string
>"noSkill" : "noSkill"
>[] : [string?, string?]
>[] : []
["trimmer", ["trimming", "edging"]];
>["trimmer", ["trimming", "edging"]] : [string, [string, string]]