Skip to content

Instantly share code, notes, and snippets.

@mheiber
Last active August 31, 2018 00:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mheiber/b6fc7adb426c2e1cdaceb5d7786fc630 to your computer and use it in GitHub Desktop.
Save mheiber/b6fc7adb426c2e1cdaceb5d7786fc630 to your computer and use it in GitHub Desktop.
Private names in nested classes
class A {
#foo;
#bar;
method() {
class B {
#foo;
methodNested(a) {
a.#foo; // error: shadowed
a.#bar; // OK
}
}
}
}
  1. Is it true, that, per the spec, private-names-in-nested-classes.js has an error on line 8, but line 9 is OK?
  2. Does the Babel transpilation output comply with the spec in this case?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment