Skip to content

No supertype allowed in handler return #604

Description

@marzipankaiser

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().

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions