Accepting new baselines

This commit is contained in:
Anders Hejlsberg 2015-01-22 11:04:09 -08:00
parent 883385f5cb
commit 21e6784038
21 changed files with 53 additions and 53 deletions

View file

@ -2,10 +2,10 @@ tests/cases/compiler/assignmentCompatBug2.ts(1,5): error TS2322: Type '{ a: numb
Property 'b' is missing in type '{ a: number; }'.
tests/cases/compiler/assignmentCompatBug2.ts(3,1): error TS2322: Type '{ a: number; }' is not assignable to type '{ b: number; }'.
Property 'b' is missing in type '{ a: number; }'.
tests/cases/compiler/assignmentCompatBug2.ts(15,1): error TS2322: Type '{ f: (n: number) => number; g: (s: string) => number; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'.
Property 'm' is missing in type '{ f: (n: number) => number; g: (s: string) => number; }'.
tests/cases/compiler/assignmentCompatBug2.ts(20,1): error TS2322: Type '{ f: (n: number) => number; m: number; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'.
Property 'g' is missing in type '{ f: (n: number) => number; m: number; }'.
tests/cases/compiler/assignmentCompatBug2.ts(15,1): error TS2322: Type '{ f: (n: number) => number; g: (s: string) => number; n?: number; k?(a: any): any; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'.
Property 'm' is missing in type '{ f: (n: number) => number; g: (s: string) => number; n?: number; k?(a: any): any; }'.
tests/cases/compiler/assignmentCompatBug2.ts(20,1): error TS2322: Type '{ f: (n: number) => number; m: number; n?: number; k?(a: any): any; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'.
Property 'g' is missing in type '{ f: (n: number) => number; m: number; n?: number; k?(a: any): any; }'.
tests/cases/compiler/assignmentCompatBug2.ts(33,1): error TS2322: Type '{ f: (n: number) => number; g: (s: string) => number; n: number; k: (a: any) => any; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'.
Property 'm' is missing in type '{ f: (n: number) => number; g: (s: string) => number; n: number; k: (a: any) => any; }'.
@ -33,16 +33,16 @@ tests/cases/compiler/assignmentCompatBug2.ts(33,1): error TS2322: Type '{ f: (n:
b3 = {
~~
!!! error TS2322: Type '{ f: (n: number) => number; g: (s: string) => number; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'.
!!! error TS2322: Property 'm' is missing in type '{ f: (n: number) => number; g: (s: string) => number; }'.
!!! error TS2322: Type '{ f: (n: number) => number; g: (s: string) => number; n?: number; k?(a: any): any; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'.
!!! error TS2322: Property 'm' is missing in type '{ f: (n: number) => number; g: (s: string) => number; n?: number; k?(a: any): any; }'.
f: (n) => { return 0; },
g: (s) => { return 0; },
}; // error
b3 = {
~~
!!! error TS2322: Type '{ f: (n: number) => number; m: number; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'.
!!! error TS2322: Property 'g' is missing in type '{ f: (n: number) => number; m: number; }'.
!!! error TS2322: Type '{ f: (n: number) => number; m: number; n?: number; k?(a: any): any; }' is not assignable to type '{ f(n: number): number; g(s: string): number; m: number; n?: number; k?(a: any): any; }'.
!!! error TS2322: Property 'g' is missing in type '{ f: (n: number) => number; m: number; n?: number; k?(a: any): any; }'.
f: (n) => { return 0; },
m: 0,
}; // error

View file

@ -51,13 +51,13 @@ var b: { foo: string; baz?: string }
var a2: S2 = { foo: '' };
>a2 : S2
>S2 : S2
>{ foo: '' } : { foo: string; }
>{ foo: '' } : { foo: string; bar?: string; }
>foo : string
var b2: T2 = { foo: '' };
>b2 : T2
>T2 : T2
>{ foo: '' } : { foo: string; }
>{ foo: '' } : { foo: string; baz?: string; }
>foo : string
s = t;

View file

@ -12,7 +12,7 @@ module __test1__ {
>U : U
>obj4 : interfaceWithPublicAndOptional<number, string>
>interfaceWithPublicAndOptional : interfaceWithPublicAndOptional<T, U>
>{ one: 1 } : { one: number; }
>{ one: 1 } : { one: number; two?: string; }
>one : number
export var __val__obj4 = obj4;

View file

@ -12,7 +12,7 @@ module __test1__ {
>U : U
>obj4 : interfaceWithPublicAndOptional<number, string>
>interfaceWithPublicAndOptional : interfaceWithPublicAndOptional<T, U>
>{ one: 1 } : { one: number; }
>{ one: 1 } : { one: number; two?: string; }
>one : number
export var __val__obj4 = obj4;

View file

@ -12,7 +12,7 @@ module __test1__ {
>U : U
>obj4 : interfaceWithPublicAndOptional<number, string>
>interfaceWithPublicAndOptional : interfaceWithPublicAndOptional<T, U>
>{ one: 1 } : { one: number; }
>{ one: 1 } : { one: number; two?: string; }
>one : number
export var __val__obj4 = obj4;

View file

@ -12,7 +12,7 @@ module __test1__ {
>U : U
>obj4 : interfaceWithPublicAndOptional<number, string>
>interfaceWithPublicAndOptional : interfaceWithPublicAndOptional<T, U>
>{ one: 1 } : { one: number; }
>{ one: 1 } : { one: number; two?: string; }
>one : number
export var __val__obj4 = obj4;

View file

@ -12,7 +12,7 @@ module __test1__ {
>U : U
>obj4 : interfaceWithPublicAndOptional<number, string>
>interfaceWithPublicAndOptional : interfaceWithPublicAndOptional<T, U>
>{ one: 1 } : { one: number; }
>{ one: 1 } : { one: number; two?: string; }
>one : number
export var __val__obj4 = obj4;

View file

@ -12,7 +12,7 @@ module __test1__ {
>U : U
>obj4 : interfaceWithPublicAndOptional<number, string>
>interfaceWithPublicAndOptional : interfaceWithPublicAndOptional<T, U>
>{ one: 1 } : { one: number; }
>{ one: 1 } : { one: number; two?: string; }
>one : number
export var __val__obj4 = obj4;
@ -29,7 +29,7 @@ module __test2__ {
>T : T
>obj3 : interfaceWithOptional<number>
>interfaceWithOptional : interfaceWithOptional<T>
>{ } : {}
>{ } : { one?: number; }
export var __val__obj3 = obj3;
>__val__obj3 : interfaceWithOptional<number>

View file

@ -12,7 +12,7 @@ module __test1__ {
>U : U
>obj4 : interfaceWithPublicAndOptional<number, string>
>interfaceWithPublicAndOptional : interfaceWithPublicAndOptional<T, U>
>{ one: 1 } : { one: number; }
>{ one: 1 } : { one: number; two?: string; }
>one : number
export var __val__obj4 = obj4;
@ -32,7 +32,7 @@ module __test2__ {
>U : U
>obj4 : interfaceWithPublicAndOptional<number, string>
>interfaceWithPublicAndOptional : interfaceWithPublicAndOptional<T, U>
>{ one: 1 } : { one: number; }
>{ one: 1 } : { one: number; two?: string; }
>one : number
export var __val__obj4 = obj4;

View file

@ -12,7 +12,7 @@ module __test1__ {
>U : U
>obj4 : interfaceWithPublicAndOptional<number, string>
>interfaceWithPublicAndOptional : interfaceWithPublicAndOptional<T, U>
>{ one: 1 } : { one: number; }
>{ one: 1 } : { one: number; two?: string; }
>one : number
export var __val__obj4 = obj4;

View file

@ -12,7 +12,7 @@ module __test1__ {
>U : U
>obj4 : interfaceWithPublicAndOptional<number, string>
>interfaceWithPublicAndOptional : interfaceWithPublicAndOptional<T, U>
>{ one: 1 } : { one: number; }
>{ one: 1 } : { one: number; two?: string; }
>one : number
export var __val__obj4 = obj4;

View file

@ -14,8 +14,8 @@ Object.defineProperty({}, "0", <PropertyDescriptor>({
>{} : {}
><PropertyDescriptor>({ get: getFunc, set: setFunc, configurable: true }) : PropertyDescriptor
>PropertyDescriptor : PropertyDescriptor
>({ get: getFunc, set: setFunc, configurable: true }) : { get: () => any; set: (v: any) => void; configurable: boolean; }
>{ get: getFunc, set: setFunc, configurable: true } : { get: () => any; set: (v: any) => void; configurable: boolean; }
>({ get: getFunc, set: setFunc, configurable: true }) : { get: () => any; set: (v: any) => void; configurable: boolean; enumerable?: boolean; value?: any; writable?: boolean; }
>{ get: getFunc, set: setFunc, configurable: true } : { get: () => any; set: (v: any) => void; configurable: boolean; enumerable?: boolean; value?: any; writable?: boolean; }
get: getFunc,
>get : () => any

View file

@ -39,8 +39,8 @@ tests/cases/compiler/intTypeCheck.ts(146,5): error TS2322: Type 'boolean' is not
tests/cases/compiler/intTypeCheck.ts(146,21): error TS1109: Expression expected.
tests/cases/compiler/intTypeCheck.ts(146,22): error TS2304: Cannot find name 'i4'.
tests/cases/compiler/intTypeCheck.ts(147,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
tests/cases/compiler/intTypeCheck.ts(152,5): error TS2322: Type '{}' is not assignable to type 'i5'.
Property 'p' is missing in type '{}'.
tests/cases/compiler/intTypeCheck.ts(152,5): error TS2322: Type '{ p1?: any; p2?: string; p4?(): any; p5?(): void; p7?(pa1: any, pa2: any): void; }' is not assignable to type 'i5'.
Property 'p' is missing in type '{ p1?: any; p2?: string; p4?(): any; p5?(): void; p7?(pa1: any, pa2: any): void; }'.
tests/cases/compiler/intTypeCheck.ts(153,5): error TS2322: Type 'Object' is not assignable to type 'i5'.
Property 'p' is missing in type 'Object'.
tests/cases/compiler/intTypeCheck.ts(154,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
@ -313,8 +313,8 @@ tests/cases/compiler/intTypeCheck.ts(203,17): error TS2351: Cannot use 'new' wit
var obj44: i5;
var obj45: i5 = {};
~~~~~
!!! error TS2322: Type '{}' is not assignable to type 'i5'.
!!! error TS2322: Property 'p' is missing in type '{}'.
!!! error TS2322: Type '{ p1?: any; p2?: string; p4?(): any; p5?(): void; p7?(pa1: any, pa2: any): void; }' is not assignable to type 'i5'.
!!! error TS2322: Property 'p' is missing in type '{ p1?: any; p2?: string; p4?(): any; p5?(): void; p7?(pa1: any, pa2: any): void; }'.
var obj46: i5 = new Object();
~~~~~
!!! error TS2322: Type 'Object' is not assignable to type 'i5'.

View file

@ -34,27 +34,27 @@ class Bug {
>{} : { [x: string]: undefined; }
this.values['comments'] = { italic: true };
>this.values['comments'] = { italic: true } : { italic: boolean; }
>this.values['comments'] = { italic: true } : { italic: boolean; bold?: boolean; }
>this.values['comments'] : IOptions
>this.values : IMap
>this : Bug
>values : IMap
>{ italic: true } : { italic: boolean; }
>{ italic: true } : { italic: boolean; bold?: boolean; }
>italic : boolean
}
shouldBeOK() {
>shouldBeOK : () => void
this.values = {
>this.values = { comments: { italic: true } } : { [x: string]: { italic: boolean; }; comments: { italic: boolean; }; }
>this.values = { comments: { italic: true } } : { [x: string]: { italic: boolean; bold?: boolean; }; comments: { italic: boolean; bold?: boolean; }; }
>this.values : IMap
>this : Bug
>values : IMap
>{ comments: { italic: true } } : { [x: string]: { italic: boolean; }; comments: { italic: boolean; }; }
>{ comments: { italic: true } } : { [x: string]: { italic: boolean; bold?: boolean; }; comments: { italic: boolean; bold?: boolean; }; }
comments: { italic: true }
>comments : { italic: boolean; }
>{ italic: true } : { italic: boolean; }
>comments : { italic: boolean; bold?: boolean; }
>{ italic: true } : { italic: boolean; bold?: boolean; }
>italic : boolean
};

View file

@ -11,8 +11,8 @@
>obj : {}
><PropertyDescriptor>({ get: function () { eval("public = 1;"); return 11; }, set: function (v) { } }) : PropertyDescriptor
>PropertyDescriptor : PropertyDescriptor
>({ get: function () { eval("public = 1;"); return 11; }, set: function (v) { } }) : { get: () => number; set: (v: any) => void; }
>{ get: function () { eval("public = 1;"); return 11; }, set: function (v) { } } : { get: () => number; set: (v: any) => void; }
>({ get: function () { eval("public = 1;"); return 11; }, set: function (v) { } }) : { get: () => number; set: (v: any) => void; configurable?: boolean; enumerable?: boolean; value?: any; writable?: boolean; }
>{ get: function () { eval("public = 1;"); return 11; }, set: function (v) { } } : { get: () => number; set: (v: any) => void; configurable?: boolean; enumerable?: boolean; value?: any; writable?: boolean; }
get: function () {
>get : () => number

View file

@ -21,7 +21,7 @@ defineMyProperty({}, "name", { get: function () { return 5; } });
>defineMyProperty({}, "name", { get: function () { return 5; } }) : any
>defineMyProperty : (o: any, p: string, attributes: MyPropertyDescriptor) => any
>{} : {}
>{ get: function () { return 5; } } : { get: () => number; }
>{ get: function () { return 5; } } : { get: () => number; set?(v: any): void; }
>get : () => number
>function () { return 5; } : () => number
@ -47,7 +47,7 @@ defineMyProperty2({}, "name", { get: function () { return 5; } });
>defineMyProperty2({}, "name", { get: function () { return 5; } }) : any
>defineMyProperty2 : (o: any, p: string, attributes: MyPropertyDescriptor2) => any
>{} : {}
>{ get: function () { return 5; } } : { get: () => number; }
>{ get: function () { return 5; } } : { get: () => number; set?: (v: any) => void; }
>get : () => number
>function () { return 5; } : () => number

View file

@ -1,5 +1,5 @@
tests/cases/compiler/optionalPropertiesTest.ts(14,1): error TS2322: Type '{ name: string; }' is not assignable to type 'IFoo'.
Property 'id' is missing in type '{ name: string; }'.
tests/cases/compiler/optionalPropertiesTest.ts(14,1): error TS2322: Type '{ name: string; print?(): void; }' is not assignable to type 'IFoo'.
Property 'id' is missing in type '{ name: string; print?(): void; }'.
tests/cases/compiler/optionalPropertiesTest.ts(25,5): error TS2322: Type '{}' is not assignable to type 'i1'.
Property 'M' is missing in type '{}'.
tests/cases/compiler/optionalPropertiesTest.ts(26,5): error TS2322: Type '{}' is not assignable to type 'i3'.
@ -24,8 +24,8 @@ tests/cases/compiler/optionalPropertiesTest.ts(40,1): error TS2322: Type 'i2' is
foo = { id: 1234, name: "test" }; // Ok
foo = { name: "test" }; // Error, id missing
~~~
!!! error TS2322: Type '{ name: string; }' is not assignable to type 'IFoo'.
!!! error TS2322: Property 'id' is missing in type '{ name: string; }'.
!!! error TS2322: Type '{ name: string; print?(): void; }' is not assignable to type 'IFoo'.
!!! error TS2322: Property 'id' is missing in type '{ name: string; print?(): void; }'.
foo = {id: 1234, print:()=>{}} // Ok
var s = foo.name || "default";

View file

@ -105,17 +105,17 @@ var a1 = a.a({});
>a.a : { (o: Opt1): Opt1; (o: Opt2): Opt2; (o: Opt3): Opt3; (o: Opt4): Opt4; }
>a : A
>a : { (o: Opt1): Opt1; (o: Opt2): Opt2; (o: Opt3): Opt3; (o: Opt4): Opt4; }
>{} : {}
>{} : { r?: any; }
var a1 = a({});
>a1 : Opt3
>a({}) : Opt3
>a : A
>{} : {}
>{} : { r?: any; }
var a1 = new a({});
>a1 : Opt3
>new a({}) : Opt3
>a : A
>{} : {}
>{} : { r?: any; }

View file

@ -108,17 +108,17 @@ var a1 = a.a({});
>a.a : { (o: Opt1): Opt1; (o: Opt2): Opt2; (o: Opt3): Opt3; (o: Opt4): Opt4; }
>a : A
>a : { (o: Opt1): Opt1; (o: Opt2): Opt2; (o: Opt3): Opt3; (o: Opt4): Opt4; }
>{} : {}
>{} : { r?: any; }
var a1 = a({});
>a1 : Opt3
>a({}) : Opt3
>a : A
>{} : {}
>{} : { r?: any; }
var a1 = new a({});
>a1 : Opt3
>new a({}) : Opt3
>a : A
>{} : {}
>{} : { r?: any; }

View file

@ -23,16 +23,16 @@ interface IMenuItem {
var menuData: IMenuItem[] = [
>menuData : IMenuItem[]
>IMenuItem : IMenuItem
>[ { "id": "ourLogo", "type": "image", "link": "", "icon": "modules/menu/logo.svg" }, { "id": "productName", "type": "default", "link": "", "text": "Product Name" }] : ({ "id": string; "type": string; "link": string; "icon": string; } | { "id": string; "type": string; "link": string; "text": string; })[]
>[ { "id": "ourLogo", "type": "image", "link": "", "icon": "modules/menu/logo.svg" }, { "id": "productName", "type": "default", "link": "", "text": "Product Name" }] : ({ "id": string; "type": string; "link": string; "icon": string; classes?: string; text?: string; } | { "id": string; "type": string; "link": string; "text": string; classes?: string; icon?: string; })[]
{
>{ "id": "ourLogo", "type": "image", "link": "", "icon": "modules/menu/logo.svg" } : { "id": string; "type": string; "link": string; "icon": string; }
>{ "id": "ourLogo", "type": "image", "link": "", "icon": "modules/menu/logo.svg" } : { "id": string; "type": string; "link": string; "icon": string; classes?: string; text?: string; }
"id": "ourLogo",
"type": "image",
"link": "",
"icon": "modules/menu/logo.svg"
}, {
>{ "id": "productName", "type": "default", "link": "", "text": "Product Name" } : { "id": string; "type": string; "link": string; "text": string; }
>{ "id": "productName", "type": "default", "link": "", "text": "Product Name" } : { "id": string; "type": string; "link": string; "text": string; classes?: string; icon?: string; }
"id": "productName",
"type": "default",

View file

@ -1317,11 +1317,11 @@ compiled2({ epithet: "stooge" });
>epithet : string
_.templateSettings = {
>_.templateSettings = { interpolate: /\{\{(.+?)\}\}/g} : { interpolate: RegExp; }
>_.templateSettings = { interpolate: /\{\{(.+?)\}\}/g} : { interpolate: RegExp; evaluate?: RegExp; escape?: RegExp; }
>_.templateSettings : Underscore.TemplateSettings
>_ : Underscore.Static
>templateSettings : Underscore.TemplateSettings
>{ interpolate: /\{\{(.+?)\}\}/g} : { interpolate: RegExp; }
>{ interpolate: /\{\{(.+?)\}\}/g} : { interpolate: RegExp; evaluate?: RegExp; escape?: RegExp; }
interpolate: /\{\{(.+?)\}\}/g
>interpolate : RegExp
@ -1347,7 +1347,7 @@ _.template("Using 'with': <%= data.answer %>", { answer: 'no' }, { variable: 'da
>template : { (templateString: string): (data: any) => string; (templateString: string, data: any, settings?: Underscore.TemplateSettings): string; }
>{ answer: 'no' } : { answer: string; }
>answer : string
>{ variable: 'data' } : { variable: string; }
>{ variable: 'data' } : { variable: string; evaluate?: RegExp; interpolate?: RegExp; escape?: RegExp; }
>variable : string
=== tests/cases/compiler/underscoreTest1_underscore.ts ===