return statements in awaitLet are bad #5

Open
opened 2025-11-01 13:53:48 +00:00 by NQN · 0 comments
Owner

There should be a warning or error when calling (return ...) in the body of an awaitLet, because those returns are not operating in the simulated context of the function you're writing. They're happening in the generated then() and making the types not unify.

Maybe an alternate fix would be to give the generated then() a return :Null ? But then you couldn't make an async function return something through awaitLet.

There should be a warning or error when calling `(return ...)` in the body of an awaitLet, because those returns are not operating in the simulated context of the function you're writing. They're happening in the generated `then()` and making the types not unify. Maybe an alternate fix would be to give the generated `then()` a return `:Null` ? But then you couldn't make an async function return something through awaitLet.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kiss-lang/kiss#5
No description provided.