Skip to content

Commit fec0977

Browse files
Accepted baselines.
1 parent 69195a9 commit fec0977

8 files changed

+24
-30
lines changed

tests/baselines/reference/privateNamesEscapeSequences01(target=es2015).errors.txt

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,12 @@ tests/cases/conformance/classes/members/privateNames/PrivateIdentifierNameWithEs
44
tests/cases/conformance/classes/members/privateNames/PrivateIdentifierNameWithEscape1.ts(5,15): error TS1005: ';' expected.
55
tests/cases/conformance/classes/members/privateNames/PrivateIdentifierNameWithEscape1.ts(5,15): error TS2663: Cannot find name '\u0078'. Did you mean the instance member 'this.\u0078'?
66
tests/cases/conformance/classes/members/privateNames/PrivateIdentifierNameWithEscape1.ts(9,14): error TS2339: Property '#x' does not exist on type 'PrivateIdentifierWithEscape1'.
7-
tests/cases/conformance/classes/members/privateNames/PrivateIdentifierNameWithEscape2.ts(9,14): error TS2339: Property '#xx' does not exist on type 'PrivateIdentifierWithEscape2'.
87
tests/cases/conformance/classes/members/privateNames/PrivateIdentifierNameWithExtendedEscape1.ts(2,5): error TS1127: Invalid character.
98
tests/cases/conformance/classes/members/privateNames/PrivateIdentifierNameWithExtendedEscape1.ts(2,6): error TS1005: ';' expected.
109
tests/cases/conformance/classes/members/privateNames/PrivateIdentifierNameWithExtendedEscape1.ts(5,14): error TS1127: Invalid character.
1110
tests/cases/conformance/classes/members/privateNames/PrivateIdentifierNameWithExtendedEscape1.ts(5,15): error TS1005: ';' expected.
1211
tests/cases/conformance/classes/members/privateNames/PrivateIdentifierNameWithExtendedEscape1.ts(5,15): error TS2663: Cannot find name '\u{78}'. Did you mean the instance member 'this.\u{78}'?
1312
tests/cases/conformance/classes/members/privateNames/PrivateIdentifierNameWithExtendedEscape1.ts(9,14): error TS2339: Property '#x' does not exist on type 'PrivateIdentifierWithExtendedEscape1'.
14-
tests/cases/conformance/classes/members/privateNames/PrivateIdentifierNameWithExtendedEscape2.ts(9,14): error TS2339: Property '#xx' does not exist on type 'PrivateIdentifierWithExtendedEscape2'.
1513

1614

1715
==== tests/cases/conformance/classes/members/privateNames/IdentifierNameWithEscape1.ts (0 errors) ====
@@ -91,7 +89,7 @@ tests/cases/conformance/classes/members/privateNames/PrivateIdentifierNameWithEx
9189
}
9290
}
9391

94-
==== tests/cases/conformance/classes/members/privateNames/PrivateIdentifierNameWithEscape2.ts (1 errors) ====
92+
==== tests/cases/conformance/classes/members/privateNames/PrivateIdentifierNameWithEscape2.ts (0 errors) ====
9593
export class PrivateIdentifierWithEscape2 {
9694
#x\u0078: number;
9795

@@ -101,8 +99,6 @@ tests/cases/conformance/classes/members/privateNames/PrivateIdentifierNameWithEx
10199

102100
doThing() {
103101
this.#xx = 42;
104-
~~~
105-
!!! error TS2339: Property '#xx' does not exist on type 'PrivateIdentifierWithEscape2'.
106102
}
107103
}
108104

@@ -131,7 +127,7 @@ tests/cases/conformance/classes/members/privateNames/PrivateIdentifierNameWithEx
131127
}
132128
}
133129

134-
==== tests/cases/conformance/classes/members/privateNames/PrivateIdentifierNameWithExtendedEscape2.ts (1 errors) ====
130+
==== tests/cases/conformance/classes/members/privateNames/PrivateIdentifierNameWithExtendedEscape2.ts (0 errors) ====
135131
export class PrivateIdentifierWithExtendedEscape2 {
136132
#x\u{78}: number;
137133

@@ -141,8 +137,6 @@ tests/cases/conformance/classes/members/privateNames/PrivateIdentifierNameWithEx
141137

142138
doThing() {
143139
this.#xx = 42;
144-
~~~
145-
!!! error TS2339: Property '#xx' does not exist on type 'PrivateIdentifierWithExtendedEscape2'.
146140
}
147141
}
148142

tests/baselines/reference/privateNamesEscapeSequences01(target=es2015).js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -166,17 +166,17 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (
166166
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
167167
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
168168
};
169-
var _PrivateIdentifierWithEscape2_x\u0078;
169+
var _PrivateIdentifierWithEscape2_xx;
170170
export class PrivateIdentifierWithEscape2 {
171171
constructor() {
172-
_PrivateIdentifierWithEscape2_x\u0078.set(this, void 0);
173-
__classPrivateFieldSet(this, _PrivateIdentifierWithEscape2_x\u0078, 0, "f");
172+
_PrivateIdentifierWithEscape2_xx.set(this, void 0);
173+
__classPrivateFieldSet(this, _PrivateIdentifierWithEscape2_xx, 0, "f");
174174
}
175175
doThing() {
176-
this. = 42;
176+
__classPrivateFieldSet(this, _PrivateIdentifierWithEscape2_xx, 42, "f");
177177
}
178178
}
179-
_PrivateIdentifierWithEscape2_x\u0078 = new WeakMap();
179+
_PrivateIdentifierWithEscape2_xx = new WeakMap();
180180
//// [PrivateIdentifierNameWithExtendedEscape1.js]
181181
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
182182
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
@@ -202,14 +202,14 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (
202202
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
203203
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
204204
};
205-
var _PrivateIdentifierWithExtendedEscape2_x\u{78};
205+
var _PrivateIdentifierWithExtendedEscape2_xx;
206206
export class PrivateIdentifierWithExtendedEscape2 {
207207
constructor() {
208-
_PrivateIdentifierWithExtendedEscape2_x\u{78}.set(this, void 0);
209-
__classPrivateFieldSet(this, _PrivateIdentifierWithExtendedEscape2_x\u{78}, 0, "f");
208+
_PrivateIdentifierWithExtendedEscape2_xx.set(this, void 0);
209+
__classPrivateFieldSet(this, _PrivateIdentifierWithExtendedEscape2_xx, 0, "f");
210210
}
211211
doThing() {
212-
this. = 42;
212+
__classPrivateFieldSet(this, _PrivateIdentifierWithExtendedEscape2_xx, 42, "f");
213213
}
214214
}
215-
_PrivateIdentifierWithExtendedEscape2_x\u{78} = new WeakMap();
215+
_PrivateIdentifierWithExtendedEscape2_xx = new WeakMap();

tests/baselines/reference/privateNamesEscapeSequences01(target=es2015).symbols

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ export class PrivateIdentifierWithEscape2 {
133133
>doThing : Symbol(PrivateIdentifierWithEscape2.doThing, Decl(PrivateIdentifierNameWithEscape2.ts, 5, 5))
134134

135135
this.#xx = 42;
136+
>this.#xx : Symbol(PrivateIdentifierWithEscape2.#x\u0078, Decl(PrivateIdentifierNameWithEscape2.ts, 0, 43))
136137
>this : Symbol(PrivateIdentifierWithEscape2, Decl(PrivateIdentifierNameWithEscape2.ts, 0, 0))
137138
}
138139
}
@@ -176,6 +177,7 @@ export class PrivateIdentifierWithExtendedEscape2 {
176177
>doThing : Symbol(PrivateIdentifierWithExtendedEscape2.doThing, Decl(PrivateIdentifierNameWithExtendedEscape2.ts, 5, 5))
177178

178179
this.#xx = 42;
180+
>this.#xx : Symbol(PrivateIdentifierWithExtendedEscape2.#x\u{78}, Decl(PrivateIdentifierNameWithExtendedEscape2.ts, 0, 51))
179181
>this : Symbol(PrivateIdentifierWithExtendedEscape2, Decl(PrivateIdentifierNameWithExtendedEscape2.ts, 0, 0))
180182
}
181183
}

tests/baselines/reference/privateNamesEscapeSequences01(target=es2015).types

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ export class PrivateIdentifierWithEscape2 {
158158

159159
this.#xx = 42;
160160
>this.#xx = 42 : 42
161-
>this.#xx : any
161+
>this.#xx : number
162162
>this : this
163163
>42 : 42
164164
}
@@ -212,7 +212,7 @@ export class PrivateIdentifierWithExtendedEscape2 {
212212

213213
this.#xx = 42;
214214
>this.#xx = 42 : 42
215-
>this.#xx : any
215+
>this.#xx : number
216216
>this : this
217217
>42 : 42
218218
}

tests/baselines/reference/privateNamesEscapeSequences01(target=es5).errors.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ tests/cases/conformance/classes/members/privateNames/PrivateIdentifierNameWithEs
3737
tests/cases/conformance/classes/members/privateNames/PrivateIdentifierNameWithEscape1.ts(5,15): error TS2663: Cannot find name '\u0078'. Did you mean the instance member 'this.\u0078'?
3838
tests/cases/conformance/classes/members/privateNames/PrivateIdentifierNameWithEscape1.ts(9,14): error TS2339: Property '#x' does not exist on type 'PrivateIdentifierWithEscape1'.
3939
tests/cases/conformance/classes/members/privateNames/PrivateIdentifierNameWithEscape2.ts(2,5): error TS18028: Private identifiers are only available when targeting ECMAScript 2015 and higher.
40-
tests/cases/conformance/classes/members/privateNames/PrivateIdentifierNameWithEscape2.ts(9,14): error TS2339: Property '#xx' does not exist on type 'PrivateIdentifierWithEscape2'.
4140
tests/cases/conformance/classes/members/privateNames/PrivateIdentifierNameWithExtendedEscape1.ts(2,5): error TS1127: Invalid character.
4241
tests/cases/conformance/classes/members/privateNames/PrivateIdentifierNameWithExtendedEscape1.ts(2,6): error TS1127: Invalid character.
4342
tests/cases/conformance/classes/members/privateNames/PrivateIdentifierNameWithExtendedEscape1.ts(2,7): error TS1434: Unexpected keyword or identifier.
@@ -215,7 +214,7 @@ tests/cases/conformance/classes/members/privateNames/PrivateIdentifierNameWithEx
215214
}
216215
}
217216

218-
==== tests/cases/conformance/classes/members/privateNames/PrivateIdentifierNameWithEscape2.ts (2 errors) ====
217+
==== tests/cases/conformance/classes/members/privateNames/PrivateIdentifierNameWithEscape2.ts (1 errors) ====
219218
export class PrivateIdentifierWithEscape2 {
220219
#x\u0078: number;
221220
~~~~~~~~
@@ -227,8 +226,6 @@ tests/cases/conformance/classes/members/privateNames/PrivateIdentifierNameWithEx
227226

228227
doThing() {
229228
this.#xx = 42;
230-
~~~
231-
!!! error TS2339: Property '#xx' does not exist on type 'PrivateIdentifierWithEscape2'.
232229
}
233230
}
234231

tests/baselines/reference/privateNamesEscapeSequences01(target=es5).js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -218,21 +218,21 @@ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (
218218
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
219219
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
220220
};
221-
var _PrivateIdentifierWithEscape2_x\u0078;
221+
var _PrivateIdentifierWithEscape2_xx;
222222
Object.defineProperty(exports, "__esModule", { value: true });
223223
exports.PrivateIdentifierWithEscape2 = void 0;
224224
var PrivateIdentifierWithEscape2 = /** @class */ (function () {
225225
function PrivateIdentifierWithEscape2() {
226-
_PrivateIdentifierWithEscape2_x\u0078.set(this, void 0);
227-
__classPrivateFieldSet(this, _PrivateIdentifierWithEscape2_x\u0078, 0, "f");
226+
_PrivateIdentifierWithEscape2_xx.set(this, void 0);
227+
__classPrivateFieldSet(this, _PrivateIdentifierWithEscape2_xx, 0, "f");
228228
}
229229
PrivateIdentifierWithEscape2.prototype.doThing = function () {
230-
this. = 42;
230+
__classPrivateFieldSet(this, _PrivateIdentifierWithEscape2_xx, 42, "f");
231231
};
232232
return PrivateIdentifierWithEscape2;
233233
}());
234234
exports.PrivateIdentifierWithEscape2 = PrivateIdentifierWithEscape2;
235-
_PrivateIdentifierWithEscape2_x\u0078 = new WeakMap();
235+
_PrivateIdentifierWithEscape2_xx = new WeakMap();
236236
//// [PrivateIdentifierNameWithExtendedEscape1.js]
237237
"use strict";
238238
var _PrivateIdentifierWithExtendedEscape1_;

tests/baselines/reference/privateNamesEscapeSequences01(target=es5).symbols

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ export class PrivateIdentifierWithEscape2 {
118118
>doThing : Symbol(PrivateIdentifierWithEscape2.doThing, Decl(PrivateIdentifierNameWithEscape2.ts, 5, 5))
119119

120120
this.#xx = 42;
121+
>this.#xx : Symbol(PrivateIdentifierWithEscape2.#x\u0078, Decl(PrivateIdentifierNameWithEscape2.ts, 0, 43))
121122
>this : Symbol(PrivateIdentifierWithEscape2, Decl(PrivateIdentifierNameWithEscape2.ts, 0, 0))
122123
}
123124
}

tests/baselines/reference/privateNamesEscapeSequences01(target=es5).types

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ export class PrivateIdentifierWithEscape2 {
173173

174174
this.#xx = 42;
175175
>this.#xx = 42 : 42
176-
>this.#xx : any
176+
>this.#xx : number
177177
>this : this
178178
>42 : 42
179179
}

0 commit comments

Comments
 (0)