[Issue 22077] `std.sumtype` support for copy constructors is incomplete

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Aug 11 21:44:31 UTC 2021


Paul Backus <snarwin+bugzilla at gmail.com> changed:

           What    |Removed                     |Added
                 CC|                            |snarwin+bugzilla at gmail.com

--- Comment #1 from Paul Backus <snarwin+bugzilla at gmail.com> ---
The first example looks like a bad error message. The actual problem is that
you cannot call a @system copy constructor from @safe code--and indeed,
changing main to @system allows the example to compile successfully.

The second example is a mistake in SumType, and should not be difficult to fix.


More information about the Digitalmars-d-bugs mailing list