On Saturday, 18 December 2021 at 11:01:53 UTC, Denis Feklushkin wrote:
On Friday, 17 December 2021 at 19:03:05 UTC, Tejas wrote:

Well, I got completely mislead by my experiment 😓

```d
struct S
{
    ~this() immutable {}
}
```

Interesting what discussed behaviour isn't affects method what implements same functionality as dtor and called explictly at each appropriate place.

So for dirty fix I just created

```d
    void __custom_dtor() const
    { ... }
```

And then called this __custom_dtor at each dtor what uses this struct.

As Ali said, this is an implementation issue.

So I guess the answer to your question is that this is a bug.

Please file a report at [issues.dlang.org](issues.dlang.org)

Reply via email to