Skip to content

provide assertMatch #39

Description

@FraMecca

In D it is not possible to write:

value.match!((A a) => a, (_) =>assert(false))

instead of using trymatch or a nullable I think it would be useful to have an assertMatch that raises an exception when the type can't be handled. Possibly you can come up with a better name than assertMatch.

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

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions