Skip to content

provide assertMatch #39

@FraMecca

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.

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