-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Throw ERRBadAwait
instead of ERRnoSemic
if applicable
#6955
Throw ERRBadAwait
instead of ERRnoSemic
if applicable
#6955
Conversation
Thanks for the contribution, it would be nice to see this changed. Unfortunately the test fails look legitimate to me, (as in this appears to have introduced a new bug) if you can work out what's gone wrong that would be great, if not I'll try and investigate on Monday or Tuesday. |
@rhuanjl Comparing the CI output of a PR with "no code" and mine it seems like the failing tests might be unrelated to the changes in this PR Both failed with
|
Seems you were right, CI is sorted now, this PR looks good though I'd ideally not like to introduce the TS comments to our codebase. |
@rhuanjl Comments are removed
It's still a bit scary to have CI failing randomly |
I think it was an issue ages ago that's been fixed in the meantime... I'll gain additional confidence of that if it passes again now having already passed once before you removed the comments. |
Issue
It might happen that a developer forgets to declare a function as
async
but still usesawait
as a keyword.In this case the CC parser will just display a
ERRnoSemic
as seen in #5103.Changes
According to the proposal of @rhuanjl in #5103 (comment) the parser now checks if the previous token was a
tkID
equal toawait
.In that case the parser throws a
ERRBadAwait
.Fixes #5103