[Issue 24403] New: Nullable doesn't work with non-mutable types with a destructor
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Feb 21 05:01:59 UTC 2024
https://issues.dlang.org/show_bug.cgi?id=24403
Issue ID: 24403
Summary: Nullable doesn't work with non-mutable types with a
destructor
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: issues.dlang at jmdavisProg.com
This code does not compile but should:
---
void main()
{
import std.typecons : Nullable;
static struct S
{
~this()
{
}
}
Nullable!(const S) s;
}
---
Nullable's destructor is able to handle mutable types but not const or
immutable types.
--
More information about the Digitalmars-d-bugs
mailing list