December 18, 2021

On Friday, 17 December 2021 at 19:03:05 UTC, Tejas wrote:

>

Well, I got completely mislead by my experiment 😓

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

    void __custom_dtor() const
    { ... }

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

December 18, 2021

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 😓

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

    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

December 18, 2021

On Saturday, 18 December 2021 at 12:50:17 UTC, Tejas wrote:

>

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

Looks like this is same case:
https://issues.dlang.org/show_bug.cgi?id=13628

1 2
Next ›   Last »