Skip to content

Make match work with function results #9086

@skelly37

Description

@skelly37

Related problem

I don't really know how to describe it but sometimes we keep global constants as functions returning the value. It would be nice to have match supporting it instead of having the else if ladder.

Describe the solution you'd like

The function return values should be evaluated

image

This match statement should match log CRITICAL_LEVEL_PREFIX, now it evaluates the default _ option

Describe alternatives you've considered

if-else works just fine but match is sometimes the cleaner way to do something

Additional context and details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions