Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class fields #1949

Closed
shabakur-mitra opened this issue Apr 29, 2019 · 3 comments · Fixed by #1950
Closed

Class fields #1949

shabakur-mitra opened this issue Apr 29, 2019 · 3 comments · Fixed by #1950

Comments

@shabakur-mitra
Copy link

Fix from #1292 doesn't work (/cc @Thom1729)

class MongoDB_Wrapper extends BaseWrapper {
  #data = getDataObject();

  fetchData(params = []) {
    let num = 0;
    for (const param of this.#data.get('value'))
      if (param === null) return -1;
      else num += param.size;
    return num;
  }
}

We need fast fix for this. Hope someone can resolve it soon.

@Thom1729
Copy link
Collaborator

Looks like the private field implementation does not handle private names as dotted properties. I'll fix it.

@Thom1729
Copy link
Collaborator

Looks like this.#foo was never implemented at all, but because of graceful error handling no one noticed. The inside of a for/of declaration is necessarily a lot less fault-tolerant, so it blew up.

If you need a fix right away, you can download the syntax in the PR into your Packages directory (under Packages/JavaScript/JavaScript.sublime-syntax). If you do, just remember to un-patch it eventually.

@shabakur-mitra
Copy link
Author

Thank you sir

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants