Skip to content

Commit 06c4867

Browse files
committedApr 27, 2018
jake baseline-accept
Object.toString() --> Boolean.toString() look good
1 parent 6d66dd9 commit 06c4867

9 files changed

+38
-38
lines changed
 

‎tests/baselines/reference/booleanPropertyAccess.symbols

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ var x = true;
44

55
var a = x.toString();
66
>a : Symbol(a, Decl(booleanPropertyAccess.ts, 2, 3))
7-
>x.toString : Symbol(Object.toString, Decl(lib.d.ts, --, --))
7+
>x.toString : Symbol(Boolean.toString, Decl(lib.d.ts, --, --))
88
>x : Symbol(x, Decl(booleanPropertyAccess.ts, 0, 3))
9-
>toString : Symbol(Object.toString, Decl(lib.d.ts, --, --))
9+
>toString : Symbol(Boolean.toString, Decl(lib.d.ts, --, --))
1010

1111
var b = x['toString']();
1212
>b : Symbol(b, Decl(booleanPropertyAccess.ts, 3, 3))
1313
>x : Symbol(x, Decl(booleanPropertyAccess.ts, 0, 3))
14-
>'toString' : Symbol(Object.toString, Decl(lib.d.ts, --, --))
14+
>'toString' : Symbol(Boolean.toString, Decl(lib.d.ts, --, --))
1515

‎tests/baselines/reference/keyofAndIndexedAccess.types

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ type K02 = keyof number; // "toString" | "toFixed" | "toExponential" | ...
6868
>K02 : "toString" | "toLocaleString" | "valueOf" | "toFixed" | "toExponential" | "toPrecision"
6969

7070
type K03 = keyof boolean; // "valueOf"
71-
>K03 : "valueOf"
71+
>K03 : "toString" | "valueOf"
7272

7373
type K04 = keyof void; // never
7474
>K04 : never

‎tests/baselines/reference/mappedTypeRecursiveInference.types

+10-10
Large diffs are not rendered by default.

‎tests/baselines/reference/toStringOnPrimitives.symbols

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
=== tests/cases/compiler/toStringOnPrimitives.ts ===
22
true.toString()
3-
>true.toString : Symbol(Object.toString, Decl(lib.d.ts, --, --))
4-
>toString : Symbol(Object.toString, Decl(lib.d.ts, --, --))
3+
>true.toString : Symbol(Boolean.toString, Decl(lib.d.ts, --, --))
4+
>toString : Symbol(Boolean.toString, Decl(lib.d.ts, --, --))
55

66
var aBool = false;
77
>aBool : Symbol(aBool, Decl(toStringOnPrimitives.ts, 1, 3))
88

99
aBool.toString();
10-
>aBool.toString : Symbol(Object.toString, Decl(lib.d.ts, --, --))
10+
>aBool.toString : Symbol(Boolean.toString, Decl(lib.d.ts, --, --))
1111
>aBool : Symbol(aBool, Decl(toStringOnPrimitives.ts, 1, 3))
12-
>toString : Symbol(Object.toString, Decl(lib.d.ts, --, --))
12+
>toString : Symbol(Boolean.toString, Decl(lib.d.ts, --, --))
1313

1414
1..toString();
1515
>1..toString : Symbol(Number.toString, Decl(lib.d.ts, --, --))

‎tests/baselines/reference/typeGuardsInFunctionAndModuleBlock.symbols

+12-12
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ function foo(x: number | string | boolean) {
2222
>x : Symbol(x, Decl(typeGuardsInFunctionAndModuleBlock.ts, 2, 13))
2323

2424
? x.toString() // boolean
25-
>x.toString : Symbol(Object.toString, Decl(lib.d.ts, --, --))
25+
>x.toString : Symbol(Boolean.toString, Decl(lib.d.ts, --, --))
2626
>x : Symbol(x, Decl(typeGuardsInFunctionAndModuleBlock.ts, 2, 13))
27-
>toString : Symbol(Object.toString, Decl(lib.d.ts, --, --))
27+
>toString : Symbol(Boolean.toString, Decl(lib.d.ts, --, --))
2828

2929
: x.toString(); // number
3030
>x.toString : Symbol(Number.toString, Decl(lib.d.ts, --, --))
@@ -55,9 +55,9 @@ function foo2(x: number | string | boolean) {
5555
>x : Symbol(x, Decl(typeGuardsInFunctionAndModuleBlock.ts, 12, 14))
5656

5757
? x.toString() // boolean
58-
>x.toString : Symbol(Object.toString, Decl(lib.d.ts, --, --))
58+
>x.toString : Symbol(Boolean.toString, Decl(lib.d.ts, --, --))
5959
>x : Symbol(x, Decl(typeGuardsInFunctionAndModuleBlock.ts, 12, 14))
60-
>toString : Symbol(Object.toString, Decl(lib.d.ts, --, --))
60+
>toString : Symbol(Boolean.toString, Decl(lib.d.ts, --, --))
6161

6262
: x.toString(); // number
6363
>x.toString : Symbol(Number.toString, Decl(lib.d.ts, --, --))
@@ -86,9 +86,9 @@ function foo3(x: number | string | boolean) {
8686
>x : Symbol(x, Decl(typeGuardsInFunctionAndModuleBlock.ts, 22, 14))
8787

8888
? x.toString() // boolean
89-
>x.toString : Symbol(Object.toString, Decl(lib.d.ts, --, --))
89+
>x.toString : Symbol(Boolean.toString, Decl(lib.d.ts, --, --))
9090
>x : Symbol(x, Decl(typeGuardsInFunctionAndModuleBlock.ts, 22, 14))
91-
>toString : Symbol(Object.toString, Decl(lib.d.ts, --, --))
91+
>toString : Symbol(Boolean.toString, Decl(lib.d.ts, --, --))
9292

9393
: x.toString(); // number
9494
>x.toString : Symbol(Number.toString, Decl(lib.d.ts, --, --))
@@ -118,9 +118,9 @@ function foo4(x: number | string | boolean) {
118118
>x : Symbol(x, Decl(typeGuardsInFunctionAndModuleBlock.ts, 32, 14))
119119

120120
? x.toString() // boolean
121-
>x.toString : Symbol(Object.toString, Decl(lib.d.ts, --, --))
121+
>x.toString : Symbol(Boolean.toString, Decl(lib.d.ts, --, --))
122122
>x : Symbol(x, Decl(typeGuardsInFunctionAndModuleBlock.ts, 32, 14))
123-
>toString : Symbol(Object.toString, Decl(lib.d.ts, --, --))
123+
>toString : Symbol(Boolean.toString, Decl(lib.d.ts, --, --))
124124

125125
: x.toString(); // number
126126
>x.toString : Symbol(Number.toString, Decl(lib.d.ts, --, --))
@@ -180,9 +180,9 @@ module m {
180180
>x : Symbol(x, Decl(typeGuardsInFunctionAndModuleBlock.ts, 52, 7))
181181

182182
? x.toString() // boolean
183-
>x.toString : Symbol(Object.toString, Decl(lib.d.ts, --, --))
183+
>x.toString : Symbol(Boolean.toString, Decl(lib.d.ts, --, --))
184184
>x : Symbol(x, Decl(typeGuardsInFunctionAndModuleBlock.ts, 52, 7))
185-
>toString : Symbol(Object.toString, Decl(lib.d.ts, --, --))
185+
>toString : Symbol(Boolean.toString, Decl(lib.d.ts, --, --))
186186

187187
: x.toString(); // number
188188
>x.toString : Symbol(Number.toString, Decl(lib.d.ts, --, --))
@@ -221,9 +221,9 @@ module m1 {
221221
>x : Symbol(x, Decl(typeGuardsInFunctionAndModuleBlock.ts, 66, 7))
222222

223223
? x.toString() // boolean
224-
>x.toString : Symbol(Object.toString, Decl(lib.d.ts, --, --))
224+
>x.toString : Symbol(Boolean.toString, Decl(lib.d.ts, --, --))
225225
>x : Symbol(x, Decl(typeGuardsInFunctionAndModuleBlock.ts, 66, 7))
226-
>toString : Symbol(Object.toString, Decl(lib.d.ts, --, --))
226+
>toString : Symbol(Boolean.toString, Decl(lib.d.ts, --, --))
227227

228228
: x.toString(); // number
229229
>x.toString : Symbol(Number.toString, Decl(lib.d.ts, --, --))

‎tests/baselines/reference/typeGuardsInIfStatement.symbols

+2-2
Original file line numberDiff line numberDiff line change
@@ -252,9 +252,9 @@ function foo11(x: number | string | boolean) {
252252
y = x && x.toString() // number | boolean | string
253253
>y : Symbol(y, Decl(typeGuardsInIfStatement.ts, 114, 11))
254254
>x : Symbol(x, Decl(typeGuardsInIfStatement.ts, 107, 15))
255-
>x.toString : Symbol(Object.toString, Decl(lib.d.ts, --, --))
255+
>x.toString : Symbol(Boolean.toString, Decl(lib.d.ts, --, --))
256256
>x : Symbol(x, Decl(typeGuardsInIfStatement.ts, 107, 15))
257-
>toString : Symbol(Object.toString, Decl(lib.d.ts, --, --))
257+
>toString : Symbol(Boolean.toString, Decl(lib.d.ts, --, --))
258258

259259
);
260260
}

‎tests/baselines/reference/typeGuardsInRightOperandOfAndAndOperator.symbols

+2-2
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ function foo7(x: number | string | boolean) {
112112
: ((y = x) && x.toString()))); // x is boolean
113113
>y : Symbol(y, Decl(typeGuardsInRightOperandOfAndAndOperator.ts, 33, 7))
114114
>x : Symbol(x, Decl(typeGuardsInRightOperandOfAndAndOperator.ts, 32, 14))
115-
>x.toString : Symbol(Object.toString, Decl(lib.d.ts, --, --))
115+
>x.toString : Symbol(Boolean.toString, Decl(lib.d.ts, --, --))
116116
>x : Symbol(x, Decl(typeGuardsInRightOperandOfAndAndOperator.ts, 32, 14))
117-
>toString : Symbol(Object.toString, Decl(lib.d.ts, --, --))
117+
>toString : Symbol(Boolean.toString, Decl(lib.d.ts, --, --))
118118
}
119119

‎tests/baselines/reference/typeGuardsInRightOperandOfOrOrOperator.symbols

+2-2
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ function foo7(x: number | string | boolean) {
113113
: ((y = x) && x.toString()))); // number | boolean | string
114114
>y : Symbol(y, Decl(typeGuardsInRightOperandOfOrOrOperator.ts, 34, 7))
115115
>x : Symbol(x, Decl(typeGuardsInRightOperandOfOrOrOperator.ts, 33, 14))
116-
>x.toString : Symbol(Object.toString, Decl(lib.d.ts, --, --))
116+
>x.toString : Symbol(Boolean.toString, Decl(lib.d.ts, --, --))
117117
>x : Symbol(x, Decl(typeGuardsInRightOperandOfOrOrOperator.ts, 33, 14))
118-
>toString : Symbol(Object.toString, Decl(lib.d.ts, --, --))
118+
>toString : Symbol(Boolean.toString, Decl(lib.d.ts, --, --))
119119
}
120120

‎tests/baselines/reference/typeInferenceTypePredicate2.symbols

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
.map(thing => thing.toString());
1313
>map : Symbol(Array.map, Decl(lib.d.ts, --, --))
1414
>thing : Symbol(thing, Decl(typeInferenceTypePredicate2.ts, 2, 9))
15-
>thing.toString : Symbol(Object.toString, Decl(lib.d.ts, --, --))
15+
>thing.toString : Symbol(Boolean.toString, Decl(lib.d.ts, --, --))
1616
>thing : Symbol(thing, Decl(typeInferenceTypePredicate2.ts, 2, 9))
17-
>toString : Symbol(Object.toString, Decl(lib.d.ts, --, --))
17+
>toString : Symbol(Boolean.toString, Decl(lib.d.ts, --, --))
1818

0 commit comments

Comments
 (0)
Please sign in to comment.