This is bug or not? (immutable class containing struct with dtor)
Tejas
notrealemail at gmail.com
Fri Dec 17 19:03:05 UTC 2021
On Friday, 17 December 2021 at 18:51:56 UTC, Ali Çehreli wrote:
> On 12/17/21 10:01 AM, Tejas wrote:
>
> > [...]
> Storage,
>
> There is no such requirement nor guarantee.
>
> [...]
Well, I got completely mislead by my experiment 😓
```d
struct S
{
~this() immutable {}
}
void main()
{
immutable S s = S();
}
```
This failed, so I just came up with reasons to justify this
behaviour
Thanks for correcting me 😃
More information about the Digitalmars-d-learn
mailing list