Skip to content
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

feat: error on 'for await' in non-async function #1168

Merged
merged 1 commit into from
Jan 11, 2024

Conversation

dlarocque
Copy link
Contributor

Added diagnostic when a 'for await' statement is in a non-async function, since this statement can only be used in contexts where 'await' can be used.

closes #1137

@dlarocque
Copy link
Contributor Author

@strager Do you know why the macOS AArch64 build is failing, or how I might be able to fix it? I don't see how my changes would cause the builds to fail, and I can't find any output from the failing checks.

@strager
Copy link
Collaborator

strager commented Jan 9, 2024

Do you know why the macOS AArch64 build is failing

Those jobs run on my machine in my home lab, and the machine was turned off. 🙃 It should be fixed now.

src/quick-lint-js/fe/parse-statement.cpp Outdated Show resolved Hide resolved
test/test-parse-loop.cpp Outdated Show resolved Hide resolved
Added diagnostic when a 'for await' statement is in a non-async
function, since this statement can only be used in contexts where
'await' can be used.

closes quick-lint#1137
@strager strager merged commit 5b3895d into quick-lint:master Jan 11, 2024
103 checks passed
@dlarocque dlarocque deleted the for-await-non-async-function branch January 11, 2024 01:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8$: error on 'for await' in non-async function
2 participants