2021-01-15 13:30:44 +03:00
|
|
|
// @target: es2015
|
|
|
|
|
|
|
|
class C {
|
|
|
|
#test: number = 24;
|
|
|
|
constructor() {
|
|
|
|
this.#test++;
|
|
|
|
this.#test--;
|
|
|
|
++this.#test;
|
|
|
|
--this.#test;
|
|
|
|
const a = this.#test++;
|
|
|
|
const b = this.#test--;
|
|
|
|
const c = ++this.#test;
|
|
|
|
const d = --this.#test;
|
|
|
|
for (this.#test = 0; this.#test < 10; ++this.#test) {}
|
|
|
|
for (this.#test = 0; this.#test < 10; this.#test++) {}
|
2022-08-29 13:49:01 +03:00
|
|
|
|
|
|
|
(this.#test)++;
|
|
|
|
(this.#test)--;
|
|
|
|
++(this.#test);
|
|
|
|
--(this.#test);
|
|
|
|
const e = (this.#test)++;
|
|
|
|
const f = (this.#test)--;
|
|
|
|
const g = ++(this.#test);
|
|
|
|
const h = --(this.#test);
|
|
|
|
for (this.#test = 0; this.#test < 10; ++(this.#test)) {}
|
|
|
|
for (this.#test = 0; this.#test < 10; (this.#test)++) {}
|
2021-01-15 13:30:44 +03:00
|
|
|
}
|
|
|
|
test() {
|
|
|
|
this.getInstance().#test++;
|
|
|
|
this.getInstance().#test--;
|
|
|
|
++this.getInstance().#test;
|
|
|
|
--this.getInstance().#test;
|
|
|
|
const a = this.getInstance().#test++;
|
|
|
|
const b = this.getInstance().#test--;
|
|
|
|
const c = ++this.getInstance().#test;
|
|
|
|
const d = --this.getInstance().#test;
|
|
|
|
for (this.getInstance().#test = 0; this.getInstance().#test < 10; ++this.getInstance().#test) {}
|
|
|
|
for (this.getInstance().#test = 0; this.getInstance().#test < 10; this.getInstance().#test++) {}
|
2022-08-29 13:49:01 +03:00
|
|
|
|
|
|
|
(this.getInstance().#test)++;
|
|
|
|
(this.getInstance().#test)--;
|
|
|
|
++(this.getInstance().#test);
|
|
|
|
--(this.getInstance().#test);
|
|
|
|
const e = (this.getInstance().#test)++;
|
|
|
|
const f = (this.getInstance().#test)--;
|
|
|
|
const g = ++(this.getInstance().#test);
|
|
|
|
const h = --(this.getInstance().#test);
|
|
|
|
for (this.getInstance().#test = 0; this.getInstance().#test < 10; ++(this.getInstance().#test)) {}
|
|
|
|
for (this.getInstance().#test = 0; this.getInstance().#test < 10; (this.getInstance().#test)++) {}
|
2021-01-15 13:30:44 +03:00
|
|
|
}
|
|
|
|
getInstance() { return new C(); }
|
|
|
|
}
|