Skip to content

[REG] DIP1000 scope array of arrays comparison results in weird error #21945

@dkorpel

Description

@dkorpel

Works as of 2.111, fails on master:

// REQUIRED_ARGS: -preview=dip1000
void assertEq(scope int[][3] x) @safe
{
	bool b = x == x;
}

Expected to pass, but it errors:

app.d(4): Error: can't infer return type in function `assertEq`
    bool b = x == x;

Introduced by #21513

Metadata

Metadata

Assignees

No one assigned

    Labels

    Severity:RegressionPRs that fix regressionsdip1000memory safety with scope, ref, return

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions