Skip to content

Commit 924c36a

Browse files
committed
hereby baseline-accept
1 parent 1492e25 commit 924c36a

91 files changed

Lines changed: 1335 additions & 196 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

tests/baselines/reference/anyAssignableToEveryType.symbols

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ var p: Number = a;
116116

117117
var q: String = a;
118118
>q : Symbol(q, Decl(anyAssignableToEveryType.ts, 32, 3))
119-
>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
119+
>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
120120
>a : Symbol(a, Decl(anyAssignableToEveryType.ts, 0, 3))
121121

122122
function foo<T, U /*extends T*/, V extends Date>(x: T, y: U, z: V) {

tests/baselines/reference/apparentTypeSubtyping.symbols

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
class Base<U extends String> {
88
>Base : Symbol(Base, Decl(apparentTypeSubtyping.ts, 0, 0))
99
>U : Symbol(U, Decl(apparentTypeSubtyping.ts, 3, 11))
10-
>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
10+
>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
1111

1212
x: U;
1313
>x : Symbol(Base.x, Decl(apparentTypeSubtyping.ts, 3, 30))
@@ -22,26 +22,26 @@ class Derived<U> extends Base<string> { // error
2222

2323
x: String;
2424
>x : Symbol(Derived.x, Decl(apparentTypeSubtyping.ts, 8, 39))
25-
>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
25+
>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
2626
}
2727

2828
class Base2 {
2929
>Base2 : Symbol(Base2, Decl(apparentTypeSubtyping.ts, 10, 1))
3030

3131
x: String;
3232
>x : Symbol(Base2.x, Decl(apparentTypeSubtyping.ts, 12, 13))
33-
>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
33+
>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
3434

3535
static s: String;
3636
>s : Symbol(Base2.s, Decl(apparentTypeSubtyping.ts, 13, 14))
37-
>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
37+
>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
3838
}
3939

4040
// is U extends String (S) a subtype of String (T)? Apparent type of U is String so it succeeds
4141
class Derived2<U extends String> extends Base2 { // error because of the prototype's not matching, not because of the instance side
4242
>Derived2 : Symbol(Derived2, Decl(apparentTypeSubtyping.ts, 15, 1))
4343
>U : Symbol(U, Decl(apparentTypeSubtyping.ts, 18, 15))
44-
>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
44+
>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
4545
>Base2 : Symbol(Base2, Decl(apparentTypeSubtyping.ts, 10, 1))
4646

4747
x: U;

tests/baselines/reference/apparentTypeSupertype.symbols

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class Base {
1515
class Derived<U extends String> extends Base { // error
1616
>Derived : Symbol(Derived, Decl(apparentTypeSupertype.ts, 5, 1))
1717
>U : Symbol(U, Decl(apparentTypeSupertype.ts, 8, 14))
18-
>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
18+
>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
1919
>Base : Symbol(Base, Decl(apparentTypeSupertype.ts, 0, 0))
2020

2121
x: U;

tests/baselines/reference/arrayLiterals2ES5.symbols

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ interface myArray2 extends Array<Number|String> { }
8989
>myArray2 : Symbol(myArray2, Decl(arrayLiterals2ES5.ts, 44, 43))
9090
>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
9191
>Number : Symbol(Number, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
92-
>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
92+
>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
9393

9494
var d0 = [1, true, ...temp,]; // has type (string|number|boolean)[]
9595
>d0 : Symbol(d0, Decl(arrayLiterals2ES5.ts, 46, 3))

tests/baselines/reference/arrayLiterals2ES6.symbols

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ interface myArray2 extends Array<Number|String> { }
8181
>myArray2 : Symbol(myArray2, Decl(arrayLiterals2ES6.ts, 42, 43))
8282
>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
8383
>Number : Symbol(Number, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
84-
>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --) ... and 1 more)
84+
>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --) ... and 2 more)
8585

8686
var d0 = [1, true, ...temp, ]; // has type (string|number|boolean)[]
8787
>d0 : Symbol(d0, Decl(arrayLiterals2ES6.ts, 44, 3))

tests/baselines/reference/arrayLiterals3.symbols

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ interface myArray2 extends Array<Number|String> { }
5454
>myArray2 : Symbol(myArray2, Decl(arrayLiterals3.ts, 29, 43))
5555
>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
5656
>Number : Symbol(Number, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
57-
>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
57+
>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
5858

5959
var c0: tup = [...temp2]; // Error
6060
>c0 : Symbol(c0, Decl(arrayLiterals3.ts, 31, 3))

tests/baselines/reference/assignFromStringInterface.symbols

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ var x = '';
66

77
var a: String;
88
>a : Symbol(a, Decl(assignFromStringInterface.ts, 1, 3))
9-
>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
9+
>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
1010

1111
x = a;
1212
>x : Symbol(x, Decl(assignFromStringInterface.ts, 0, 3))

tests/baselines/reference/assignFromStringInterface2.errors.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1+
assignFromStringInterface2.ts(42,1): error TS2322: Type 'NotString' is not assignable to type 'String'.
2+
The types returned by 'split(...)' are incompatible between these types.
3+
Type 'string[]' is not assignable to type '[]'.
4+
Target allows only 0 element(s) but source may have more.
15
assignFromStringInterface2.ts(47,1): error TS2322: Type 'String' is not assignable to type 'string'.
26
'string' is a primitive, but 'String' is a wrapper object. Prefer using 'string' when possible.
37
assignFromStringInterface2.ts(48,1): error TS2322: Type 'NotString' is not assignable to type 'string'.
48

59

6-
==== assignFromStringInterface2.ts (2 errors) ====
10+
==== assignFromStringInterface2.ts (3 errors) ====
711
interface String {
812
doStuff(): string;
913
}
@@ -46,6 +50,11 @@ assignFromStringInterface2.ts(48,1): error TS2322: Type 'NotString' is not assig
4650

4751
a = x;
4852
a = b;
53+
~
54+
!!! error TS2322: Type 'NotString' is not assignable to type 'String'.
55+
!!! error TS2322: The types returned by 'split(...)' are incompatible between these types.
56+
!!! error TS2322: Type 'string[]' is not assignable to type '[]'.
57+
!!! error TS2322: Target allows only 0 element(s) but source may have more.
4958

5059
b = a;
5160
b = x;

tests/baselines/reference/assignFromStringInterface2.symbols

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
=== assignFromStringInterface2.ts ===
44
interface String {
5-
>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(assignFromStringInterface2.ts, 0, 0))
5+
>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(assignFromStringInterface2.ts, 0, 0))
66

77
doStuff(): string;
88
>doStuff : Symbol(String.doStuff, Decl(assignFromStringInterface2.ts, 0, 18))
@@ -145,7 +145,7 @@ var x = '';
145145

146146
var a: String;
147147
>a : Symbol(a, Decl(assignFromStringInterface2.ts, 37, 3))
148-
>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(assignFromStringInterface2.ts, 0, 0))
148+
>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(assignFromStringInterface2.ts, 0, 0))
149149

150150
var b: NotString;
151151
>b : Symbol(b, Decl(assignFromStringInterface2.ts, 38, 3))

tests/baselines/reference/assigningFromObjectToAnythingElse.symbols

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ y = x;
1515

1616
var a: String = Object.create<Object>("");
1717
>a : Symbol(a, Decl(assigningFromObjectToAnythingElse.ts, 4, 3))
18-
>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
18+
>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
1919
>Object.create : Symbol(ObjectConstructor.create, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
2020
>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
2121
>create : Symbol(ObjectConstructor.create, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
2222
>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
2323

2424
var c: String = Object.create<Number>(1);
2525
>c : Symbol(c, Decl(assigningFromObjectToAnythingElse.ts, 5, 3))
26-
>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
26+
>String : Symbol(String, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
2727
>Object.create : Symbol(ObjectConstructor.create, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
2828
>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
2929
>create : Symbol(ObjectConstructor.create, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))

0 commit comments

Comments
 (0)