effekt-lang / effekt-lang/effekt

No supertype allowed in handler return

Open
#604 3 comments 0 reactions 0 assignees View on GitHub
area:typer
Dominant language
Scala
Stars
469
Forks
41
Avg merge
1d 16h
Merged PRs (30d)
23

Description

The following program gives the annotated error:
```effekt
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()`.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.