The following program gives the annotated error:
interface Done {
def done(): Nothing
}
def main() = {
try {
do done()
} with Done {
def done() = () // Error: Expected Nothing but got Unit.
}
}
Is this the behaviour we want?
Note that this also disallows, e.g., a hole instead of do done().
The following program gives the annotated error:
Is this the behaviour we want?
Note that this also disallows, e.g., a hole instead of
do done().