Producing W092 with a yield expression

13 views
Skip to first unread message

Ian Christian Myers

unread,
Aug 28, 2013, 8:35:32 PM8/28/13
to jsh...@googlegroups.com
The W092 warning ("Wrap the /regexp/ literal in parens to disambiguate the slash operator.") appears two times in the JSHint source. Once is for return statements, like so:

function foo() {
    return /[a-z]/.text("string");
}

The other time is for something to do with `yield`, however I cannot figure out how to produce the error using `yield`. Can someone please give me an example of what code would produce this error with a yield expression?

Thank you!
Reply all
Reply to author
Forward
0 new messages