Skip to content

Misplaced annotation warning with computed properties in ES6 classes #1126

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

Closed
ochafik opened this issue Sep 9, 2015 · 0 comments
Closed
Assignees

Comments

@ochafik
Copy link

ochafik commented Sep 9, 2015

let bar = 'bar';
class Foo {
  /** @return {boolean} */
  get [bar]() { return true; }

  /** @return {boolean} */
  ['baz']() { return true; }
}

Both members get a:
WARNING - Misplaced function annotation. This JSDoc is not attached to a function node. Are you missing parentheses?

(run with --language_in=ECMASCRIPT6_STRICT -O SIMPLE)

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

No branches or pull requests

2 participants