2.1.6 [ECMA-262/9:2018] Section 11.9.1 Rules of Automatic Semicolon Insertion

V0041: Automatic semicolon insertion is not applied to yield* productions

The specification states:

 11.9.1 Rules of Automatic Semicolon Insertion
     In the following rules, “token” means the actual recognized lexical token determined 
     using the current lexical goal symbol as described in clause 11.
     There are three basic rules of semicolon insertion:
         3.  When ... a token is encountered that is allowed by some production of the 
             grammar, but the production is a restricted production and the token would be 
             the first token for a terminal or nonterminal immediately following the 
             annotation “[no LineTerminator here]” within the restricted production (and 
             therefore such a token is called a restricted token), and the restricted 
             token is separated from the previous token by at least one LineTerminator, 
             then a semicolon is automatically inserted before the restricted token.

EdgeHTML Mode

Rule 3 is not applied to yield* productions.

    var obj = {

        *g() {


        * 1



A semicolon should be inserted in the yield* production as follows:


This would throw a SyntaxError.