Skip to content

[REG 1.0.1] match no longer returns an lvalue #65

@pbackus

Description

@pbackus
@safe unittest {
	SumType!int x = 123;

	x.match!(ref (ref int n) => n) = 456;
	// Error: match(x) is not an lvalue and cannot be modified

	assert(x.match!((int n) => n == 456));
}

This regression was introduced by PR #50, which inadvertently removed the ref attribute from matchImpl.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions