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

Promise<void> in non-async function #814

Closed
edemaine opened this issue Nov 22, 2023 · 0 comments · Fixed by #815
Closed

Promise<void> in non-async function #814

edemaine opened this issue Nov 22, 2023 · 0 comments · Fixed by #815
Labels
bug Something isn't working

Comments

@edemaine
Copy link
Collaborator

I have a real-world example where I have a function with return value Promise<void>, yet I want implicit return, because I construct the Promise explicitly via new Promise. This code breaks with modern Civet which turns off implicit returns when the return value is Promise<void>.

I think a Promise<void> return value should turn off implicit returns only for functions that are async, either explicitly or implicitly because of await. This function isn't async and that's causing a problem.

@edemaine edemaine added the bug Something isn't working label Nov 22, 2023
edemaine added a commit that referenced this issue Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant