[Issue 14531] `@disable this() immutable` disable mutable default construction, too

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Feb 17 11:31:43 UTC 2022


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

RazvanN <razvan.nitu1305 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |razvan.nitu1305 at gmail.com
         Resolution|---                         |INVALID

--- Comment #1 from RazvanN <razvan.nitu1305 at gmail.com> ---
It doesn't matter whether the default constructor is annotated with immutable
or not since its result is always going to be unique (nobody else has access to
it), therefore it can be implicitly converted to any combination of qualifiers.
The compiler doesn't even look at the qualifier in this case.

So this issue is invalid.

--


More information about the Digitalmars-d-bugs mailing list