-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support undecorated static accessor in anonymous classes (#16485)
- Loading branch information
Showing
10 changed files
with
256 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 0 additions & 6 deletions
6
...n-proposal-decorators/test/fixtures/2023-11-accessors/undecorated-static-private/input.js
This file was deleted.
Oops, something went wrong.
18 changes: 18 additions & 0 deletions
18
...-proposal-decorators/test/fixtures/2023-11-accessors/undecorated-static-private/input.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
const dec = () => {}; | ||
class Foo { | ||
static accessor #a; | ||
|
||
static accessor #b = 123; | ||
} | ||
|
||
Foo = class { | ||
static accessor #a; | ||
|
||
static accessor #b = 123; | ||
} | ||
|
||
export default class { | ||
static accessor #a; | ||
|
||
static accessor #b = 123; | ||
} |
17 changes: 0 additions & 17 deletions
17
...-proposal-decorators/test/fixtures/2023-11-accessors/undecorated-static-private/output.js
This file was deleted.
Oops, something went wrong.
49 changes: 49 additions & 0 deletions
49
...proposal-decorators/test/fixtures/2023-11-accessors/undecorated-static-private/output.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
const dec = () => {}; | ||
class Foo { | ||
static #A; | ||
static get #a() { | ||
return Foo.#A; | ||
} | ||
static set #a(v) { | ||
Foo.#A = v; | ||
} | ||
static #B = 123; | ||
static get #b() { | ||
return Foo.#B; | ||
} | ||
static set #b(v) { | ||
Foo.#B = v; | ||
} | ||
} | ||
Foo = class Foo { | ||
static #A; | ||
static get #a() { | ||
return Foo.#A; | ||
} | ||
static set #a(v) { | ||
Foo.#A = v; | ||
} | ||
static #B = 123; | ||
static get #b() { | ||
return Foo.#B; | ||
} | ||
static set #b(v) { | ||
Foo.#B = v; | ||
} | ||
}; | ||
export default class _Class { | ||
static #A; | ||
static get #a() { | ||
return _Class.#A; | ||
} | ||
static set #a(v) { | ||
_Class.#A = v; | ||
} | ||
static #B = 123; | ||
static get #b() { | ||
return _Class.#B; | ||
} | ||
static set #b(v) { | ||
_Class.#B = v; | ||
} | ||
} |
8 changes: 0 additions & 8 deletions
8
...in-proposal-decorators/test/fixtures/2023-11-accessors/undecorated-static-public/input.js
This file was deleted.
Oops, something went wrong.
24 changes: 24 additions & 0 deletions
24
...n-proposal-decorators/test/fixtures/2023-11-accessors/undecorated-static-public/input.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
const dec = () => {}; | ||
class Foo { | ||
static accessor a; | ||
|
||
static accessor b = 123; | ||
|
||
static accessor ['c'] = 456; | ||
} | ||
|
||
Foo = class { | ||
static accessor a; | ||
|
||
static accessor b = 123; | ||
|
||
static accessor ['c'] = 456; | ||
} | ||
|
||
export default class { | ||
static accessor a; | ||
|
||
static accessor b = 123; | ||
|
||
static accessor ['c'] = 456; | ||
} |
24 changes: 0 additions & 24 deletions
24
...n-proposal-decorators/test/fixtures/2023-11-accessors/undecorated-static-public/output.js
This file was deleted.
Oops, something went wrong.
70 changes: 70 additions & 0 deletions
70
...-proposal-decorators/test/fixtures/2023-11-accessors/undecorated-static-public/output.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
const dec = () => {}; | ||
class Foo { | ||
static #A; | ||
static get a() { | ||
return Foo.#A; | ||
} | ||
static set a(v) { | ||
Foo.#A = v; | ||
} | ||
static #B = 123; | ||
static get b() { | ||
return Foo.#B; | ||
} | ||
static set b(v) { | ||
Foo.#B = v; | ||
} | ||
static #C = 456; | ||
static get ['c']() { | ||
return Foo.#C; | ||
} | ||
static set ['c'](v) { | ||
Foo.#C = v; | ||
} | ||
} | ||
Foo = class Foo { | ||
static #A; | ||
static get a() { | ||
return Foo.#A; | ||
} | ||
static set a(v) { | ||
Foo.#A = v; | ||
} | ||
static #B = 123; | ||
static get b() { | ||
return Foo.#B; | ||
} | ||
static set b(v) { | ||
Foo.#B = v; | ||
} | ||
static #C = 456; | ||
static get ['c']() { | ||
return Foo.#C; | ||
} | ||
static set ['c'](v) { | ||
Foo.#C = v; | ||
} | ||
}; | ||
export default class _Class { | ||
static #A; | ||
static get a() { | ||
return _Class.#A; | ||
} | ||
static set a(v) { | ||
_Class.#A = v; | ||
} | ||
static #B = 123; | ||
static get b() { | ||
return _Class.#B; | ||
} | ||
static set b(v) { | ||
_Class.#B = v; | ||
} | ||
static #C = 456; | ||
static get ['c']() { | ||
return _Class.#C; | ||
} | ||
static set ['c'](v) { | ||
_Class.#C = v; | ||
} | ||
} |
Oops, something went wrong.