https://issues.dlang.org/show_bug.cgi?id=22614

RazvanN <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #1 from RazvanN <[email protected]> ---
It seems that for some reason annotating with @safe the unittest enables the
compiler to infer attributes for the nested struct members. This has the result
of inferring pure for the copy constructors and therefore the immutable
constructor becomes a unique constructor (which means it can be implicitly
convertible to mutable). Next, the compiler thinks that the unique copy
constructor is better than const copy constructor.

I think that the fundamental problem here is that @safe enables attribute
inference. I haven't seen this anywhere explicitly stated in the spec.

The unique conversion rules are another black box for me.

--

Reply via email to