Accepting new baselines

This commit is contained in:
Anders Hejlsberg 2015-09-06 08:55:48 -07:00
parent 27380f40dc
commit 055363c98d
7 changed files with 146 additions and 46 deletions

View file

@ -98,13 +98,13 @@ var [c2] = [];
var [[[c3]], [[[[c4]]]]] = [[[]], [[[[]]]]]
>c3 : any
>c4 : any
>[[[]], [[[[]]]]] : [[undefined[]], [[[undefined[]]]]]
>[[]] : [undefined[]]
>[] : undefined[]
>[[[[]]]] : [[[undefined[]]]]
>[[[]]] : [[undefined[]]]
>[[]] : [undefined[]]
>[] : undefined[]
>[[[]], [[[[]]]]] : [[[undefined]], [[[[undefined]]]]]
>[[]] : [[undefined]]
>[] : [undefined]
>[[[[]]]] : [[[[undefined]]]]
>[[[]]] : [[[undefined]]]
>[[]] : [[undefined]]
>[] : [undefined]
var [[c5], c6]: [[string|number], boolean] = [[1], true];
>c5 : string | number

View file

@ -99,13 +99,13 @@ var [c2] = [];
var [[[c3]], [[[[c4]]]]] = [[[]], [[[[]]]]]
>c3 : any
>c4 : any
>[[[]], [[[[]]]]] : [[undefined[]], [[[undefined[]]]]]
>[[]] : [undefined[]]
>[] : undefined[]
>[[[[]]]] : [[[undefined[]]]]
>[[[]]] : [[undefined[]]]
>[[]] : [undefined[]]
>[] : undefined[]
>[[[]], [[[[]]]]] : [[[undefined]], [[[[undefined]]]]]
>[[]] : [[undefined]]
>[] : [undefined]
>[[[[]]]] : [[[[undefined]]]]
>[[[]]] : [[[undefined]]]
>[[]] : [[undefined]]
>[] : [undefined]
var [[c5], c6]: [[string|number], boolean] = [[1], true];
>c5 : string | number

View file

@ -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; }]; }
>f : [number, number, { f3: number; f5: number; }]
>[1, 2, { f3: 4, f5: 0 }] : [number, number, { f3: number; f5: number; }]
>{ 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]
>1 : number
>2 : number
>{ f3: 4, f5: 0 } : { f3: number; f5: number; }

View file

@ -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; }]; }
>f : [number, number, { f3: number; f5: number; }]
>[1, 2, { f3: 4, f5: 0 }] : [number, number, { f3: number; f5: number; }]
>{ 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]
>1 : number
>2 : number
>{ f3: 4, f5: 0 } : { f3: number; f5: number; }

View file

@ -34,6 +34,14 @@ f6({ x: 1 });
f6({ y: 1 });
f6({ x: 1, y: 1 });
// (arg?: { a: { x?: number, y?: number } }) => void
function f7({ a: { x = 0, y = 0 } } = { a: {} }) { }
f7();
f7({ a: {} });
f7({ a: { x: 1 } });
f7({ a: { y: 1 } });
f7({ a: { x: 1, y: 1 } });
// (arg: [any, any]) => void
function g1([x, y]) { }
g1([1, 1]);
@ -95,6 +103,15 @@ f6({});
f6({ x: 1 });
f6({ y: 1 });
f6({ x: 1, y: 1 });
// (arg?: { a: { x?: number, y?: number } }) => void
function f7(_a) {
var _b = (_a === void 0 ? { a: {} } : _a).a, _c = _b.x, x = _c === void 0 ? 0 : _c, _d = _b.y, y = _d === void 0 ? 0 : _d;
}
f7();
f7({ a: {} });
f7({ a: { x: 1 } });
f7({ a: { y: 1 } });
f7({ a: { x: 1, y: 1 } });
// (arg: [any, any]) => void
function g1(_a) {
var x = _a[0], y = _a[1];

View file

@ -107,45 +107,76 @@ f6({ x: 1, y: 1 });
>x : Symbol(x, Decl(destructuringWithLiteralInitializers.ts, 33, 4))
>y : Symbol(y, Decl(destructuringWithLiteralInitializers.ts, 33, 10))
// (arg?: { a: { x?: number, y?: number } }) => void
function f7({ a: { x = 0, y = 0 } } = { a: {} }) { }
>f7 : Symbol(f7, Decl(destructuringWithLiteralInitializers.ts, 33, 19))
>a : Symbol(a, Decl(destructuringWithLiteralInitializers.ts, 36, 39))
>x : Symbol(x, Decl(destructuringWithLiteralInitializers.ts, 36, 18))
>y : Symbol(y, Decl(destructuringWithLiteralInitializers.ts, 36, 25))
>a : Symbol(a, Decl(destructuringWithLiteralInitializers.ts, 36, 39))
f7();
>f7 : Symbol(f7, Decl(destructuringWithLiteralInitializers.ts, 33, 19))
f7({ a: {} });
>f7 : Symbol(f7, Decl(destructuringWithLiteralInitializers.ts, 33, 19))
>a : Symbol(a, Decl(destructuringWithLiteralInitializers.ts, 38, 4))
f7({ a: { x: 1 } });
>f7 : Symbol(f7, Decl(destructuringWithLiteralInitializers.ts, 33, 19))
>a : Symbol(a, Decl(destructuringWithLiteralInitializers.ts, 39, 4))
>x : Symbol(x, Decl(destructuringWithLiteralInitializers.ts, 39, 9))
f7({ a: { y: 1 } });
>f7 : Symbol(f7, Decl(destructuringWithLiteralInitializers.ts, 33, 19))
>a : Symbol(a, Decl(destructuringWithLiteralInitializers.ts, 40, 4))
>y : Symbol(y, Decl(destructuringWithLiteralInitializers.ts, 40, 9))
f7({ a: { x: 1, y: 1 } });
>f7 : Symbol(f7, Decl(destructuringWithLiteralInitializers.ts, 33, 19))
>a : Symbol(a, Decl(destructuringWithLiteralInitializers.ts, 41, 4))
>x : Symbol(x, Decl(destructuringWithLiteralInitializers.ts, 41, 9))
>y : Symbol(y, Decl(destructuringWithLiteralInitializers.ts, 41, 15))
// (arg: [any, any]) => void
function g1([x, y]) { }
>g1 : Symbol(g1, Decl(destructuringWithLiteralInitializers.ts, 33, 19))
>x : Symbol(x, Decl(destructuringWithLiteralInitializers.ts, 36, 13))
>y : Symbol(y, Decl(destructuringWithLiteralInitializers.ts, 36, 15))
g1([1, 1]);
>g1 : Symbol(g1, Decl(destructuringWithLiteralInitializers.ts, 33, 19))
// (arg: [number, number]) => void
function g2([x = 0, y = 0]) { }
>g2 : Symbol(g2, Decl(destructuringWithLiteralInitializers.ts, 37, 11))
>x : Symbol(x, Decl(destructuringWithLiteralInitializers.ts, 40, 13))
>y : Symbol(y, Decl(destructuringWithLiteralInitializers.ts, 40, 19))
g2([1, 1]);
>g2 : Symbol(g2, Decl(destructuringWithLiteralInitializers.ts, 37, 11))
// (arg?: [any, any]) => void
function g3([x, y] = []) { }
>g3 : Symbol(g3, Decl(destructuringWithLiteralInitializers.ts, 41, 11))
>g1 : Symbol(g1, Decl(destructuringWithLiteralInitializers.ts, 41, 26))
>x : Symbol(x, Decl(destructuringWithLiteralInitializers.ts, 44, 13))
>y : Symbol(y, Decl(destructuringWithLiteralInitializers.ts, 44, 15))
g1([1, 1]);
>g1 : Symbol(g1, Decl(destructuringWithLiteralInitializers.ts, 41, 26))
// (arg: [number, number]) => void
function g2([x = 0, y = 0]) { }
>g2 : Symbol(g2, Decl(destructuringWithLiteralInitializers.ts, 45, 11))
>x : Symbol(x, Decl(destructuringWithLiteralInitializers.ts, 48, 13))
>y : Symbol(y, Decl(destructuringWithLiteralInitializers.ts, 48, 19))
g2([1, 1]);
>g2 : Symbol(g2, Decl(destructuringWithLiteralInitializers.ts, 45, 11))
// (arg?: [any, any]) => void
function g3([x, y] = []) { }
>g3 : Symbol(g3, Decl(destructuringWithLiteralInitializers.ts, 49, 11))
>x : Symbol(x, Decl(destructuringWithLiteralInitializers.ts, 52, 13))
>y : Symbol(y, Decl(destructuringWithLiteralInitializers.ts, 52, 15))
g3();
>g3 : Symbol(g3, Decl(destructuringWithLiteralInitializers.ts, 41, 11))
>g3 : Symbol(g3, Decl(destructuringWithLiteralInitializers.ts, 49, 11))
g3([1, 1]);
>g3 : Symbol(g3, Decl(destructuringWithLiteralInitializers.ts, 41, 11))
>g3 : Symbol(g3, Decl(destructuringWithLiteralInitializers.ts, 49, 11))
// (arg?: [number, number]) => void
function g4([x, y] = [0, 0]) { }
>g4 : Symbol(g4, Decl(destructuringWithLiteralInitializers.ts, 46, 11))
>x : Symbol(x, Decl(destructuringWithLiteralInitializers.ts, 49, 13))
>y : Symbol(y, Decl(destructuringWithLiteralInitializers.ts, 49, 15))
>g4 : Symbol(g4, Decl(destructuringWithLiteralInitializers.ts, 54, 11))
>x : Symbol(x, Decl(destructuringWithLiteralInitializers.ts, 57, 13))
>y : Symbol(y, Decl(destructuringWithLiteralInitializers.ts, 57, 15))
g4();
>g4 : Symbol(g4, Decl(destructuringWithLiteralInitializers.ts, 46, 11))
>g4 : Symbol(g4, Decl(destructuringWithLiteralInitializers.ts, 54, 11))
g4([1, 1]);
>g4 : Symbol(g4, Decl(destructuringWithLiteralInitializers.ts, 46, 11))
>g4 : Symbol(g4, Decl(destructuringWithLiteralInitializers.ts, 54, 11))

View file

@ -168,6 +168,58 @@ f6({ x: 1, y: 1 });
>y : number
>1 : number
// (arg?: { a: { x?: number, y?: number } }) => void
function f7({ a: { x = 0, y = 0 } } = { a: {} }) { }
>f7 : ({ a: { x = 0, y = 0 } }?: { a: { x?: number; y?: number; }; }) => void
>a : any
>x : number
>0 : number
>y : number
>0 : number
>{ a: {} } : { a: { x?: number; y?: number; }; }
>a : { x?: number; y?: number; }
>{} : { x?: number; y?: number; }
f7();
>f7() : void
>f7 : ({ a: { x = 0, y = 0 } }?: { a: { x?: number; y?: number; }; }) => void
f7({ a: {} });
>f7({ a: {} }) : void
>f7 : ({ a: { x = 0, y = 0 } }?: { a: { x?: number; y?: number; }; }) => void
>{ a: {} } : { a: {}; }
>a : {}
>{} : {}
f7({ a: { x: 1 } });
>f7({ a: { x: 1 } }) : void
>f7 : ({ a: { x = 0, y = 0 } }?: { a: { x?: number; y?: number; }; }) => void
>{ a: { x: 1 } } : { a: { x: number; }; }
>a : { x: number; }
>{ x: 1 } : { x: number; }
>x : number
>1 : number
f7({ a: { y: 1 } });
>f7({ a: { y: 1 } }) : void
>f7 : ({ a: { x = 0, y = 0 } }?: { a: { x?: number; y?: number; }; }) => void
>{ a: { y: 1 } } : { a: { y: number; }; }
>a : { y: number; }
>{ y: 1 } : { y: number; }
>y : number
>1 : number
f7({ a: { x: 1, y: 1 } });
>f7({ a: { x: 1, y: 1 } }) : void
>f7 : ({ a: { x = 0, y = 0 } }?: { a: { x?: number; y?: number; }; }) => void
>{ a: { x: 1, y: 1 } } : { a: { x: number; y: number; }; }
>a : { x: number; y: number; }
>{ x: 1, y: 1 } : { x: number; y: number; }
>x : number
>1 : number
>y : number
>1 : number
// (arg: [any, any]) => void
function g1([x, y]) { }
>g1 : ([x, y]: [any, any]) => void