Skip to content

SafeRefCounted features a @system constructor #10837

@0xEAB

Description

@0xEAB
std/typecons.d(7895):        and assigning scope variable `val` to non-scope parameter `source` calling `move` makes it fail to infer `@safe`
std/typecons.d(7893):        `std.typecons.SafeRefCounted!(FooBar, RefCountedAutoInitialize.yes).SafeRefCounted.this` is declared here

phobos/std/typecons.d

Lines 7893 to 7896 in 24711b9

this(return scope T val)
{
_refCounted.move(val);
}

I wouldn’t be surprised if this issue were only to occur under certain circumstances, but the error message is unfortunately not helpful.

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