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
Error on Yield "*" (star, asterisk) #3542
Labels
Comments
Confirmed. Here are a few workarounds you can use until this gets fixed: function * g() {
yield ('*');
}
function * g() {
yield '* '[0];
}
function * g() {
const star = '*';
yield star;
} This is due to an unfortunate symmetry in JSHint between tokens for literals and tokens for other terminals. We have to take extra care to specify which one of those two things we're talking about, and in this case, we failed to do that. Anyway, thanks for taking the time to file a report! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you yield the string "
*
", it will throw the following error: "E021 Expected '*
' and instead saw '*
'".Example Code that would throw the error:
The text was updated successfully, but these errors were encountered: