Skip to content

__rvalue ignored with component expressions #21693

@ibuclaw

Description

@ibuclaw
struct S { uint x; }

void f(ref x) { x++; }

void test(S s)
{
    f(__rvalue(s.x));   // compiles
    with (s)
        f(__rvalue(x)); // cannot pass rvalue argument `__rvalue((*with).z)`
}

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions