Accept baselines

This commit is contained in:
Jason Freeman
2015-07-02 15:21:09 -07:00
parent 1085e39b9a
commit 98de6117f1
8 changed files with 38 additions and 36 deletions

View File

@@ -98,7 +98,7 @@ x2 += E.a;
x2 += {};
>x2 += {} : string
>x2 : string
>{} : {}
>{} : { [x: number]: undefined; }
x2 += null;
>x2 += null : string

View File

@@ -82,5 +82,7 @@ var x4: IWithCallSignatures | IWithCallSignatures4 = a => /*here a should be any
>IWithCallSignatures : Symbol(IWithCallSignatures, Decl(contextualTypeWithUnionTypeCallSignatures.ts, 9, 1))
>IWithCallSignatures4 : Symbol(IWithCallSignatures4, Decl(contextualTypeWithUnionTypeCallSignatures.ts, 18, 1))
>a : Symbol(a, Decl(contextualTypeWithUnionTypeCallSignatures.ts, 35, 52))
>a.toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18))
>a : Symbol(a, Decl(contextualTypeWithUnionTypeCallSignatures.ts, 35, 52))
>toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18))

View File

@@ -90,10 +90,10 @@ var x4: IWithCallSignatures | IWithCallSignatures4 = a => /*here a should be any
>x4 : IWithCallSignatures | IWithCallSignatures4
>IWithCallSignatures : IWithCallSignatures
>IWithCallSignatures4 : IWithCallSignatures4
>a => /*here a should be any*/ a.toString() : (a: any) => any
>a : any
>a.toString() : any
>a.toString : any
>a : any
>toString : any
>a => /*here a should be any*/ a.toString() : (a: number) => string
>a : number
>a.toString() : string
>a.toString : (radix?: number) => string
>a : number
>toString : (radix?: number) => string

View File

@@ -37,12 +37,12 @@ var c: { (): string; (x): string };
>x : any
var r1 = foo((x) => x);
>r1 : (x: any) => any
>foo((x) => x) : (x: any) => any
>r1 : (x: string) => string
>foo((x) => x) : (x: string) => string
>foo : <T extends (x: string) => string>(x: T) => T
>(x) => x : (x: any) => any
>x : any
>x : any
>(x) => x : (x: string) => string
>x : string
>x : string
var r2 = foo((x: string) => x);
>r2 : (x: string) => string
@@ -53,12 +53,12 @@ var r2 = foo((x: string) => x);
>x : string
var r3 = foo(function (x) { return x });
>r3 : (x: any) => any
>foo(function (x) { return x }) : (x: any) => any
>r3 : (x: string) => string
>foo(function (x) { return x }) : (x: string) => string
>foo : <T extends (x: string) => string>(x: T) => T
>function (x) { return x } : (x: any) => any
>x : any
>x : any
>function (x) { return x } : (x: string) => string
>x : string
>x : string
var r4 = foo(function (x: string) { return x });
>r4 : (x: string) => string
@@ -130,8 +130,8 @@ var c2: { <T>(x: T): T; <T>(x: T, y: T): T };
>T : T
var r9 = foo(function <U>(x: U) { return x; });
>r9 : <U>(x: U) => U
>foo(function <U>(x: U) { return x; }) : <U>(x: U) => U
>r9 : (x: string) => string
>foo(function <U>(x: U) { return x; }) : (x: string) => string
>foo : <T extends (x: string) => string>(x: T) => T
>function <U>(x: U) { return x; } : <U>(x: U) => U
>U : U
@@ -140,8 +140,8 @@ var r9 = foo(function <U>(x: U) { return x; });
>x : U
var r10 = foo(<U extends string>(x: U) => x);
>r10 : <U extends string>(x: U) => U
>foo(<U extends string>(x: U) => x) : <U extends string>(x: U) => U
>r10 : (x: string) => string
>foo(<U extends string>(x: U) => x) : (x: string) => string
>foo : <T extends (x: string) => string>(x: T) => T
><U extends string>(x: U) => x : <U extends string>(x: U) => U
>U : U

View File

@@ -9,9 +9,9 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTup
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTupleType.ts(22,1): error TS2322: Type '[number, string]' is not assignable to type '[string, number]'.
Types of property '0' are incompatible.
Type 'number' is not assignable to type 'string'.
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTupleType.ts(23,1): error TS2322: Type '[{}, {}]' is not assignable to type '[string, number]'.
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTupleType.ts(23,1): error TS2322: Type '[{ [x: number]: undefined; }, {}]' is not assignable to type '[string, number]'.
Types of property '0' are incompatible.
Type '{}' is not assignable to type 'string'.
Type '{ [x: number]: undefined; }' is not assignable to type 'string'.
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTupleType.ts(24,1): error TS2322: Type '[{}]' is not assignable to type '[{}, {}]'.
Property '1' is missing in type '[{}]'.
@@ -55,9 +55,9 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTup
!!! error TS2322: Type 'number' is not assignable to type 'string'.
i1.tuple1 = [{}, {}];
~~~~~~~~~
!!! error TS2322: Type '[{}, {}]' is not assignable to type '[string, number]'.
!!! error TS2322: Type '[{ [x: number]: undefined; }, {}]' is not assignable to type '[string, number]'.
!!! error TS2322: Types of property '0' are incompatible.
!!! error TS2322: Type '{}' is not assignable to type 'string'.
!!! error TS2322: Type '{ [x: number]: undefined; }' is not assignable to type 'string'.
i2.tuple1 = [{}];
~~~~~~~~~
!!! error TS2322: Type '[{}]' is not assignable to type '[{}, {}]'.

View File

@@ -1,5 +1,5 @@
tests/cases/compiler/noErrorsInCallback.ts(4,19): error TS2345: Argument of type '{}' is not assignable to parameter of type 'string'.
tests/cases/compiler/noErrorsInCallback.ts(6,23): error TS2345: Argument of type '{}' is not assignable to parameter of type 'string'.
tests/cases/compiler/noErrorsInCallback.ts(4,19): error TS2345: Argument of type '{ [x: number]: undefined; }' is not assignable to parameter of type 'string'.
tests/cases/compiler/noErrorsInCallback.ts(6,23): error TS2345: Argument of type '{ [x: number]: undefined; }' is not assignable to parameter of type 'string'.
==== tests/cases/compiler/noErrorsInCallback.ts (2 errors) ====
@@ -8,10 +8,10 @@ tests/cases/compiler/noErrorsInCallback.ts(6,23): error TS2345: Argument of type
}
var one = new Bar({}); // Error
~~
!!! error TS2345: Argument of type '{}' is not assignable to parameter of type 'string'.
!!! error TS2345: Argument of type '{ [x: number]: undefined; }' is not assignable to parameter of type 'string'.
[].forEach(() => {
var two = new Bar({}); // No error?
~~
!!! error TS2345: Argument of type '{}' is not assignable to parameter of type 'string'.
!!! error TS2345: Argument of type '{ [x: number]: undefined; }' is not assignable to parameter of type 'string'.
});

View File

@@ -31,17 +31,17 @@ var foo: IFoo;
>IFoo : IFoo
foo.foo({ bar: null }, bar => null, bar => null);
>foo.foo({ bar: null }, bar => null, bar => null) : IBar
>foo.foo({ bar: null }, bar => null, bar => null) : { [x: string]: any; bar: any; }
>foo.foo : <TBar extends IBar>(bar: TBar, bar1: (bar: TBar) => TBar, bar2: (bar: TBar) => TBar) => TBar
>foo : IFoo
>foo : <TBar extends IBar>(bar: TBar, bar1: (bar: TBar) => TBar, bar2: (bar: TBar) => TBar) => TBar
>{ bar: null } : { [x: string]: null; bar: null; }
>bar : null
>null : null
>bar => null : (bar: IBar) => any
>bar : IBar
>bar => null : (bar: { [x: string]: any; bar: any; }) => any
>bar : { [x: string]: any; bar: any; }
>null : null
>bar => null : (bar: IBar) => any
>bar : IBar
>bar => null : (bar: { [x: string]: any; bar: any; }) => any
>bar : { [x: string]: any; bar: any; }
>null : null

View File

@@ -1,4 +1,4 @@
tests/cases/conformance/types/typeParameters/typeArgumentLists/wrappedAndRecursiveConstraints4.ts(13,12): error TS2345: Argument of type '{ length: number; charAt: (x: number) => void; }' is not assignable to parameter of type 'string'.
tests/cases/conformance/types/typeParameters/typeArgumentLists/wrappedAndRecursiveConstraints4.ts(13,12): error TS2345: Argument of type '{ [x: number]: undefined; length: number; charAt: (x: number) => void; }' is not assignable to parameter of type 'string'.
==== tests/cases/conformance/types/typeParameters/typeArgumentLists/wrappedAndRecursiveConstraints4.ts (1 errors) ====
@@ -16,4 +16,4 @@ tests/cases/conformance/types/typeParameters/typeArgumentLists/wrappedAndRecursi
var r = c.foo('');
var r2 = r({ length: 3, charAt: (x: number) => { '' } }); // error
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2345: Argument of type '{ length: number; charAt: (x: number) => void; }' is not assignable to parameter of type 'string'.
!!! error TS2345: Argument of type '{ [x: number]: undefined; length: number; charAt: (x: number) => void; }' is not assignable to parameter of type 'string'.