- Is it true, that, per the spec, private-names-in-nested-classes.js has an error on line 8, but line 9 is OK?
- Update: Yes
- Does the Babel transpilation output comply with the spec in this case?
Last active
August 31, 2018 00:35
-
-
Save mheiber/b6fc7adb426c2e1cdaceb5d7786fc630 to your computer and use it in GitHub Desktop.
Private names in nested classes
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
class A { | |
#foo; | |
#bar; | |
method() { | |
class B { | |
#foo; | |
methodNested(a) { | |
a.#foo; // error: shadowed | |
a.#bar; // OK | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment