Skip to content

Commit 98de611

Browse files
committed
Accept baselines
1 parent 1085e39 commit 98de611

8 files changed

Lines changed: 38 additions & 36 deletions

tests/baselines/reference/compoundAdditionAssignmentLHSCanBeAssigned.types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ x2 += E.a;
9898
x2 += {};
9999
>x2 += {} : string
100100
>x2 : string
101-
>{} : {}
101+
>{} : { [x: number]: undefined; }
102102

103103
x2 += null;
104104
>x2 += null : string

tests/baselines/reference/contextualTypeWithUnionTypeCallSignatures.symbols

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,5 +82,7 @@ var x4: IWithCallSignatures | IWithCallSignatures4 = a => /*here a should be any
8282
>IWithCallSignatures : Symbol(IWithCallSignatures, Decl(contextualTypeWithUnionTypeCallSignatures.ts, 9, 1))
8383
>IWithCallSignatures4 : Symbol(IWithCallSignatures4, Decl(contextualTypeWithUnionTypeCallSignatures.ts, 18, 1))
8484
>a : Symbol(a, Decl(contextualTypeWithUnionTypeCallSignatures.ts, 35, 52))
85+
>a.toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18))
8586
>a : Symbol(a, Decl(contextualTypeWithUnionTypeCallSignatures.ts, 35, 52))
87+
>toString : Symbol(Number.toString, Decl(lib.d.ts, 458, 18))
8688

tests/baselines/reference/contextualTypeWithUnionTypeCallSignatures.types

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,10 @@ var x4: IWithCallSignatures | IWithCallSignatures4 = a => /*here a should be any
9090
>x4 : IWithCallSignatures | IWithCallSignatures4
9191
>IWithCallSignatures : IWithCallSignatures
9292
>IWithCallSignatures4 : IWithCallSignatures4
93-
>a => /*here a should be any*/ a.toString() : (a: any) => any
94-
>a : any
95-
>a.toString() : any
96-
>a.toString : any
97-
>a : any
98-
>toString : any
93+
>a => /*here a should be any*/ a.toString() : (a: number) => string
94+
>a : number
95+
>a.toString() : string
96+
>a.toString : (radix?: number) => string
97+
>a : number
98+
>toString : (radix?: number) => string
9999

tests/baselines/reference/functionConstraintSatisfaction3.types

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ var c: { (): string; (x): string };
3737
>x : any
3838

3939
var r1 = foo((x) => x);
40-
>r1 : (x: any) => any
41-
>foo((x) => x) : (x: any) => any
40+
>r1 : (x: string) => string
41+
>foo((x) => x) : (x: string) => string
4242
>foo : <T extends (x: string) => string>(x: T) => T
43-
>(x) => x : (x: any) => any
44-
>x : any
45-
>x : any
43+
>(x) => x : (x: string) => string
44+
>x : string
45+
>x : string
4646

4747
var r2 = foo((x: string) => x);
4848
>r2 : (x: string) => string
@@ -53,12 +53,12 @@ var r2 = foo((x: string) => x);
5353
>x : string
5454

5555
var r3 = foo(function (x) { return x });
56-
>r3 : (x: any) => any
57-
>foo(function (x) { return x }) : (x: any) => any
56+
>r3 : (x: string) => string
57+
>foo(function (x) { return x }) : (x: string) => string
5858
>foo : <T extends (x: string) => string>(x: T) => T
59-
>function (x) { return x } : (x: any) => any
60-
>x : any
61-
>x : any
59+
>function (x) { return x } : (x: string) => string
60+
>x : string
61+
>x : string
6262

6363
var r4 = foo(function (x: string) { return x });
6464
>r4 : (x: string) => string
@@ -130,8 +130,8 @@ var c2: { <T>(x: T): T; <T>(x: T, y: T): T };
130130
>T : T
131131

132132
var r9 = foo(function <U>(x: U) { return x; });
133-
>r9 : <U>(x: U) => U
134-
>foo(function <U>(x: U) { return x; }) : <U>(x: U) => U
133+
>r9 : (x: string) => string
134+
>foo(function <U>(x: U) { return x; }) : (x: string) => string
135135
>foo : <T extends (x: string) => string>(x: T) => T
136136
>function <U>(x: U) { return x; } : <U>(x: U) => U
137137
>U : U
@@ -140,8 +140,8 @@ var r9 = foo(function <U>(x: U) { return x; });
140140
>x : U
141141

142142
var r10 = foo(<U extends string>(x: U) => x);
143-
>r10 : <U extends string>(x: U) => U
144-
>foo(<U extends string>(x: U) => x) : <U extends string>(x: U) => U
143+
>r10 : (x: string) => string
144+
>foo(<U extends string>(x: U) => x) : (x: string) => string
145145
>foo : <T extends (x: string) => string>(x: T) => T
146146
><U extends string>(x: U) => x : <U extends string>(x: U) => U
147147
>U : U

tests/baselines/reference/genericCallWithTupleType.errors.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTup
99
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTupleType.ts(22,1): error TS2322: Type '[number, string]' is not assignable to type '[string, number]'.
1010
Types of property '0' are incompatible.
1111
Type 'number' is not assignable to type 'string'.
12-
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTupleType.ts(23,1): error TS2322: Type '[{}, {}]' is not assignable to type '[string, number]'.
12+
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTupleType.ts(23,1): error TS2322: Type '[{ [x: number]: undefined; }, {}]' is not assignable to type '[string, number]'.
1313
Types of property '0' are incompatible.
14-
Type '{}' is not assignable to type 'string'.
14+
Type '{ [x: number]: undefined; }' is not assignable to type 'string'.
1515
tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTupleType.ts(24,1): error TS2322: Type '[{}]' is not assignable to type '[{}, {}]'.
1616
Property '1' is missing in type '[{}]'.
1717

@@ -55,9 +55,9 @@ tests/cases/conformance/types/typeRelationships/typeInference/genericCallWithTup
5555
!!! error TS2322: Type 'number' is not assignable to type 'string'.
5656
i1.tuple1 = [{}, {}];
5757
~~~~~~~~~
58-
!!! error TS2322: Type '[{}, {}]' is not assignable to type '[string, number]'.
58+
!!! error TS2322: Type '[{ [x: number]: undefined; }, {}]' is not assignable to type '[string, number]'.
5959
!!! error TS2322: Types of property '0' are incompatible.
60-
!!! error TS2322: Type '{}' is not assignable to type 'string'.
60+
!!! error TS2322: Type '{ [x: number]: undefined; }' is not assignable to type 'string'.
6161
i2.tuple1 = [{}];
6262
~~~~~~~~~
6363
!!! error TS2322: Type '[{}]' is not assignable to type '[{}, {}]'.
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
tests/cases/compiler/noErrorsInCallback.ts(4,19): error TS2345: Argument of type '{}' is not assignable to parameter of type 'string'.
2-
tests/cases/compiler/noErrorsInCallback.ts(6,23): error TS2345: Argument of type '{}' is not assignable to parameter of type 'string'.
1+
tests/cases/compiler/noErrorsInCallback.ts(4,19): error TS2345: Argument of type '{ [x: number]: undefined; }' is not assignable to parameter of type 'string'.
2+
tests/cases/compiler/noErrorsInCallback.ts(6,23): error TS2345: Argument of type '{ [x: number]: undefined; }' is not assignable to parameter of type 'string'.
33

44

55
==== tests/cases/compiler/noErrorsInCallback.ts (2 errors) ====
@@ -8,10 +8,10 @@ tests/cases/compiler/noErrorsInCallback.ts(6,23): error TS2345: Argument of type
88
}
99
var one = new Bar({}); // Error
1010
~~
11-
!!! error TS2345: Argument of type '{}' is not assignable to parameter of type 'string'.
11+
!!! error TS2345: Argument of type '{ [x: number]: undefined; }' is not assignable to parameter of type 'string'.
1212
[].forEach(() => {
1313
var two = new Bar({}); // No error?
1414
~~
15-
!!! error TS2345: Argument of type '{}' is not assignable to parameter of type 'string'.
15+
!!! error TS2345: Argument of type '{ [x: number]: undefined; }' is not assignable to parameter of type 'string'.
1616
});
1717

tests/baselines/reference/typeParameterFixingWithConstraints.types

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,17 @@ var foo: IFoo;
3131
>IFoo : IFoo
3232

3333
foo.foo({ bar: null }, bar => null, bar => null);
34-
>foo.foo({ bar: null }, bar => null, bar => null) : IBar
34+
>foo.foo({ bar: null }, bar => null, bar => null) : { [x: string]: any; bar: any; }
3535
>foo.foo : <TBar extends IBar>(bar: TBar, bar1: (bar: TBar) => TBar, bar2: (bar: TBar) => TBar) => TBar
3636
>foo : IFoo
3737
>foo : <TBar extends IBar>(bar: TBar, bar1: (bar: TBar) => TBar, bar2: (bar: TBar) => TBar) => TBar
3838
>{ bar: null } : { [x: string]: null; bar: null; }
3939
>bar : null
4040
>null : null
41-
>bar => null : (bar: IBar) => any
42-
>bar : IBar
41+
>bar => null : (bar: { [x: string]: any; bar: any; }) => any
42+
>bar : { [x: string]: any; bar: any; }
4343
>null : null
44-
>bar => null : (bar: IBar) => any
45-
>bar : IBar
44+
>bar => null : (bar: { [x: string]: any; bar: any; }) => any
45+
>bar : { [x: string]: any; bar: any; }
4646
>null : null
4747

tests/baselines/reference/wrappedAndRecursiveConstraints4.errors.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
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'.
1+
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'.
22

33

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

0 commit comments

Comments
 (0)