Bug 251748 - JavaScript Generator (*) considered an error
JavaScript Generator (*) considered an error
Status: RESOLVED DUPLICATE of bug 242387
Product: javascript
Classification: Unclassified
Component: -- Other --
8.0.2
PC Windows 8 x64
: P3 (vote)
: TBD
Assigned To: Petr Pisl
issues@javascript
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-04-09 21:02 UTC by ryannaddy
Modified: 2015-04-09 21:28 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ryannaddy 2015-04-09 21:02:16 UTC
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function*

When using function* the editor validates it as invalid syntax, and autoformat tries to reformat the code. According the to docs, this is valid syntax:

function* foo(){
  var index = 0;
  while (index <= 2) // when index reaches 3, 
                     // yield's done will be true 
                     // and its value will be undefined;
    yield index++;
}
Comment 1 Vladimir Riha 2015-04-09 21:28:49 UTC
Thank you for reporting. Generators are part of ES6

*** This bug has been marked as a duplicate of bug 242387 ***


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo