Skip to content

Commit 0ab2b2a

Browse files
committed
Accepting new baselines
1 parent 721f7e2 commit 0ab2b2a

6 files changed

+85
-69
lines changed
Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
11
tests/cases/compiler/assignmentCompat1.ts(4,1): error TS2322: Type '{ [index: string]: any; }' is not assignable to type '{ one: number; }'.
22
Property 'one' is missing in type '{ [index: string]: any; }'.
3-
tests/cases/compiler/assignmentCompat1.ts(5,1): error TS2322: Type '{ one: number; }' is not assignable to type '{ [index: string]: any; }'.
4-
Index signature is missing in type '{ one: number; }'.
53

64

7-
==== tests/cases/compiler/assignmentCompat1.ts (2 errors) ====
5+
==== tests/cases/compiler/assignmentCompat1.ts (1 errors) ====
86
var x = {one: 1};
97
var y: {[index:string]: any};
108

119
x = y;
1210
~
1311
!!! error TS2322: Type '{ [index: string]: any; }' is not assignable to type '{ one: number; }'.
1412
!!! error TS2322: Property 'one' is missing in type '{ [index: string]: any; }'.
15-
y = x;
16-
~
17-
!!! error TS2322: Type '{ one: number; }' is not assignable to type '{ [index: string]: any; }'.
18-
!!! error TS2322: Index signature is missing in type '{ one: number; }'.
13+
y = x;

tests/baselines/reference/assignmentCompatability36.errors.txt

Lines changed: 0 additions & 17 deletions
This file was deleted.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
=== tests/cases/compiler/assignmentCompatability36.ts ===
2+
module __test1__ {
3+
>__test1__ : Symbol(__test1__, Decl(assignmentCompatability36.ts, 0, 0))
4+
5+
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
6+
>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability36.ts, 0, 18))
7+
>T : Symbol(T, Decl(assignmentCompatability36.ts, 1, 52))
8+
>U : Symbol(U, Decl(assignmentCompatability36.ts, 1, 54))
9+
>one : Symbol(one, Decl(assignmentCompatability36.ts, 1, 58))
10+
>T : Symbol(T, Decl(assignmentCompatability36.ts, 1, 52))
11+
>two : Symbol(two, Decl(assignmentCompatability36.ts, 1, 66))
12+
>U : Symbol(U, Decl(assignmentCompatability36.ts, 1, 54))
13+
>obj4 : Symbol(obj4, Decl(assignmentCompatability36.ts, 1, 83))
14+
>interfaceWithPublicAndOptional : Symbol(interfaceWithPublicAndOptional, Decl(assignmentCompatability36.ts, 0, 18))
15+
>one : Symbol(one, Decl(assignmentCompatability36.ts, 1, 139))
16+
17+
export var __val__obj4 = obj4;
18+
>__val__obj4 : Symbol(__val__obj4, Decl(assignmentCompatability36.ts, 2, 14))
19+
>obj4 : Symbol(obj4, Decl(assignmentCompatability36.ts, 1, 83))
20+
}
21+
module __test2__ {
22+
>__test2__ : Symbol(__test2__, Decl(assignmentCompatability36.ts, 3, 1))
23+
24+
export var aa:{[index:string]:any;};;
25+
>aa : Symbol(aa, Decl(assignmentCompatability36.ts, 5, 14))
26+
>index : Symbol(index, Decl(assignmentCompatability36.ts, 5, 20))
27+
28+
export var __val__aa = aa;
29+
>__val__aa : Symbol(__val__aa, Decl(assignmentCompatability36.ts, 6, 14))
30+
>aa : Symbol(aa, Decl(assignmentCompatability36.ts, 5, 14))
31+
}
32+
__test2__.__val__aa = __test1__.__val__obj4
33+
>__test2__.__val__aa : Symbol(__test2__.__val__aa, Decl(assignmentCompatability36.ts, 6, 14))
34+
>__test2__ : Symbol(__test2__, Decl(assignmentCompatability36.ts, 3, 1))
35+
>__val__aa : Symbol(__test2__.__val__aa, Decl(assignmentCompatability36.ts, 6, 14))
36+
>__test1__.__val__obj4 : Symbol(__test1__.__val__obj4, Decl(assignmentCompatability36.ts, 2, 14))
37+
>__test1__ : Symbol(__test1__, Decl(assignmentCompatability36.ts, 0, 0))
38+
>__val__obj4 : Symbol(__test1__.__val__obj4, Decl(assignmentCompatability36.ts, 2, 14))
39+
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
=== tests/cases/compiler/assignmentCompatability36.ts ===
2+
module __test1__ {
3+
>__test1__ : typeof __test1__
4+
5+
export interface interfaceWithPublicAndOptional<T,U> { one: T; two?: U; }; var obj4: interfaceWithPublicAndOptional<number,string> = { one: 1 };;
6+
>interfaceWithPublicAndOptional : interfaceWithPublicAndOptional<T, U>
7+
>T : T
8+
>U : U
9+
>one : T
10+
>T : T
11+
>two : U
12+
>U : U
13+
>obj4 : interfaceWithPublicAndOptional<number, string>
14+
>interfaceWithPublicAndOptional : interfaceWithPublicAndOptional<T, U>
15+
>{ one: 1 } : { one: number; }
16+
>one : number
17+
>1 : number
18+
19+
export var __val__obj4 = obj4;
20+
>__val__obj4 : interfaceWithPublicAndOptional<number, string>
21+
>obj4 : interfaceWithPublicAndOptional<number, string>
22+
}
23+
module __test2__ {
24+
>__test2__ : typeof __test2__
25+
26+
export var aa:{[index:string]:any;};;
27+
>aa : { [index: string]: any; }
28+
>index : string
29+
30+
export var __val__aa = aa;
31+
>__val__aa : { [index: string]: any; }
32+
>aa : { [index: string]: any; }
33+
}
34+
__test2__.__val__aa = __test1__.__val__obj4
35+
>__test2__.__val__aa = __test1__.__val__obj4 : __test1__.interfaceWithPublicAndOptional<number, string>
36+
>__test2__.__val__aa : { [index: string]: any; }
37+
>__test2__ : typeof __test2__
38+
>__val__aa : { [index: string]: any; }
39+
>__test1__.__val__obj4 : __test1__.interfaceWithPublicAndOptional<number, string>
40+
>__test1__ : typeof __test1__
41+
>__val__obj4 : __test1__.interfaceWithPublicAndOptional<number, string>
42+

tests/baselines/reference/indexTypeCheck.errors.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
tests/cases/compiler/indexTypeCheck.ts(2,2): error TS1021: An index signature must have a type annotation.
22
tests/cases/compiler/indexTypeCheck.ts(3,2): error TS1021: An index signature must have a type annotation.
33
tests/cases/compiler/indexTypeCheck.ts(17,2): error TS2413: Numeric index type 'number' is not assignable to string index type 'string'.
4-
tests/cases/compiler/indexTypeCheck.ts(22,2): error TS2413: Numeric index type 'Orange' is not assignable to string index type 'Yellow'.
54
tests/cases/compiler/indexTypeCheck.ts(27,2): error TS2413: Numeric index type 'number' is not assignable to string index type 'string'.
65
tests/cases/compiler/indexTypeCheck.ts(32,3): error TS1096: An index signature must have exactly one parameter.
76
tests/cases/compiler/indexTypeCheck.ts(36,3): error TS1023: An index signature parameter type must be 'string' or 'number'.
87
tests/cases/compiler/indexTypeCheck.ts(51,1): error TS2342: An index expression argument must be of type 'string', 'number', 'symbol, or 'any'.
98

109

11-
==== tests/cases/compiler/indexTypeCheck.ts (8 errors) ====
10+
==== tests/cases/compiler/indexTypeCheck.ts (7 errors) ====
1211
interface Red {
1312
[n:number]; // ok
1413
~~~~~~~~~~~
@@ -37,8 +36,6 @@ tests/cases/compiler/indexTypeCheck.ts(51,1): error TS2342: An index expression
3736

3837
interface Green {
3938
[n:number]: Orange; // error
40-
~~~~~~~~~~~~~~~~~~~
41-
!!! error TS2413: Numeric index type 'Orange' is not assignable to string index type 'Yellow'.
4239
[s:string]: Yellow; // ok
4340
}
4441

tests/baselines/reference/intTypeCheck.errors.txt

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,7 @@ tests/cases/compiler/intTypeCheck.ts(134,5): error TS2322: Type 'boolean' is not
2929
tests/cases/compiler/intTypeCheck.ts(134,21): error TS1109: Expression expected.
3030
tests/cases/compiler/intTypeCheck.ts(134,22): error TS2304: Cannot find name 'i3'.
3131
tests/cases/compiler/intTypeCheck.ts(135,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
32-
tests/cases/compiler/intTypeCheck.ts(141,5): error TS2322: Type 'Object' is not assignable to type 'i4'.
33-
Index signature is missing in type 'Object'.
3432
tests/cases/compiler/intTypeCheck.ts(142,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
35-
tests/cases/compiler/intTypeCheck.ts(143,5): error TS2322: Type 'Base' is not assignable to type 'i4'.
36-
Index signature is missing in type 'Base'.
37-
tests/cases/compiler/intTypeCheck.ts(145,5): error TS2322: Type '() => void' is not assignable to type 'i4'.
38-
Index signature is missing in type '() => void'.
39-
tests/cases/compiler/intTypeCheck.ts(148,5): error TS2322: Type 'boolean' is not assignable to type 'i4'.
40-
Index signature is missing in type 'Boolean'.
4133
tests/cases/compiler/intTypeCheck.ts(148,21): error TS1109: Expression expected.
4234
tests/cases/compiler/intTypeCheck.ts(148,22): error TS2304: Cannot find name 'i4'.
4335
tests/cases/compiler/intTypeCheck.ts(149,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
@@ -73,21 +65,13 @@ tests/cases/compiler/intTypeCheck.ts(190,5): error TS2322: Type 'boolean' is not
7365
tests/cases/compiler/intTypeCheck.ts(190,21): error TS1109: Expression expected.
7466
tests/cases/compiler/intTypeCheck.ts(190,22): error TS2304: Cannot find name 'i7'.
7567
tests/cases/compiler/intTypeCheck.ts(191,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
76-
tests/cases/compiler/intTypeCheck.ts(197,5): error TS2322: Type 'Object' is not assignable to type 'i8'.
77-
Index signature is missing in type 'Object'.
7868
tests/cases/compiler/intTypeCheck.ts(198,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
79-
tests/cases/compiler/intTypeCheck.ts(199,5): error TS2322: Type 'Base' is not assignable to type 'i8'.
80-
Index signature is missing in type 'Base'.
81-
tests/cases/compiler/intTypeCheck.ts(201,5): error TS2322: Type '() => void' is not assignable to type 'i8'.
82-
Index signature is missing in type '() => void'.
83-
tests/cases/compiler/intTypeCheck.ts(204,5): error TS2322: Type 'boolean' is not assignable to type 'i8'.
84-
Index signature is missing in type 'Boolean'.
8569
tests/cases/compiler/intTypeCheck.ts(204,21): error TS1109: Expression expected.
8670
tests/cases/compiler/intTypeCheck.ts(204,22): error TS2304: Cannot find name 'i8'.
8771
tests/cases/compiler/intTypeCheck.ts(205,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
8872

8973

90-
==== tests/cases/compiler/intTypeCheck.ts (69 errors) ====
74+
==== tests/cases/compiler/intTypeCheck.ts (61 errors) ====
9175
interface i1 {
9276
//Property Signatures
9377
p;
@@ -287,27 +271,15 @@ tests/cases/compiler/intTypeCheck.ts(205,17): error TS2351: Cannot use 'new' wit
287271
var obj33: i4;
288272
var obj34: i4 = {};
289273
var obj35: i4 = new Object();
290-
~~~~~
291-
!!! error TS2322: Type 'Object' is not assignable to type 'i4'.
292-
!!! error TS2322: Index signature is missing in type 'Object'.
293274
var obj36: i4 = new obj33;
294275
~~~~~~~~~
295276
!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
296277
var obj37: i4 = new Base;
297-
~~~~~
298-
!!! error TS2322: Type 'Base' is not assignable to type 'i4'.
299-
!!! error TS2322: Index signature is missing in type 'Base'.
300278
var obj38: i4 = null;
301279
var obj39: i4 = function () { };
302-
~~~~~
303-
!!! error TS2322: Type '() => void' is not assignable to type 'i4'.
304-
!!! error TS2322: Index signature is missing in type '() => void'.
305280
//var obj40: i4 = function foo() { };
306281
var obj41: i4 = <i4> anyVar;
307282
var obj42: i4 = new <i4> anyVar;
308-
~~~~~
309-
!!! error TS2322: Type 'boolean' is not assignable to type 'i4'.
310-
!!! error TS2322: Index signature is missing in type 'Boolean'.
311283
~
312284
!!! error TS1109: Expression expected.
313285
~~
@@ -421,27 +393,15 @@ tests/cases/compiler/intTypeCheck.ts(205,17): error TS2351: Cannot use 'new' wit
421393
var obj77: i8;
422394
var obj78: i8 = {};
423395
var obj79: i8 = new Object();
424-
~~~~~
425-
!!! error TS2322: Type 'Object' is not assignable to type 'i8'.
426-
!!! error TS2322: Index signature is missing in type 'Object'.
427396
var obj80: i8 = new obj77;
428397
~~~~~~~~~
429398
!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
430399
var obj81: i8 = new Base;
431-
~~~~~
432-
!!! error TS2322: Type 'Base' is not assignable to type 'i8'.
433-
!!! error TS2322: Index signature is missing in type 'Base'.
434400
var obj82: i8 = null;
435401
var obj83: i8 = function () { };
436-
~~~~~
437-
!!! error TS2322: Type '() => void' is not assignable to type 'i8'.
438-
!!! error TS2322: Index signature is missing in type '() => void'.
439402
//var obj84: i8 = function foo() { };
440403
var obj85: i8 = <i8> anyVar;
441404
var obj86: i8 = new <i8> anyVar;
442-
~~~~~
443-
!!! error TS2322: Type 'boolean' is not assignable to type 'i8'.
444-
!!! error TS2322: Index signature is missing in type 'Boolean'.
445405
~
446406
!!! error TS1109: Expression expected.
447407
~~

0 commit comments

Comments
 (0)