Open marzipankaiser opened 3 weeks ago
Note: I assume we just don't add the effects from the header of the while when checking in typer, so might be an easy fix.
Yes, we just need to add guardEffs
here:
https://github.com/effekt-lang/effekt/blob/e0e5c60e3fdda4dbc693207a776ae60f41b0d292/effekt/shared/src/main/scala/effekt/Typer.scala#L122
The following program compiles without typer errors:
but crashes at runtime (in JS), because there is no handler for the
do foo
in the loop header. The type offooo
is shown (at least via LSP) asdef fooo(): Unit / {}
.Adding a handler in main generates a warning that the handler is unused (but runs fine).