Skip to content

cannot compile createRC with custom dtor class #208

@ShigekiKarita

Description

@ShigekiKarita

When I inserted custom dtor ~this() nothrow {} to the existing class in unittest, it failed.

static class C : D, I
{
double value;
ref double bar() @safe pure nothrow @nogc { return value; }
this(double d) { value = d; }
}

dub test
Generating test runner configuration 'mir-algorithm-test-default' for 'default' (library).
Excluding package.d file from test due to https://issues.dlang.org/show_bug.cgi?id=11847
Excluding package.d file from test due to https://issues.dlang.org/show_bug.cgi?id=11847
Excluding package.d file from test due to https://issues.dlang.org/show_bug.cgi?id=11847
Excluding package.d file from test due to https://issues.dlang.org/show_bug.cgi?id=11847
Excluding package.d file from test due to https://issues.dlang.org/show_bug.cgi?id=11847
Performing "unittest" build using /home/karita/dlang/dmd-2.087.0/linux/bin64/dmd for x86_64.
mir-core 0.3.5: target for configuration "library" is up to date.
mir-algorithm 3.5.0-alpha11: building configuration "mir-algorithm-test-default"...
Warning: multivariate cubic spline with derivatives was not tested!!!
Warning: multivariate cubic spline with derivatives was not tested!!!
source/mir/type_info.d(72,29): Error: function object.destroy!(true, C).destroy is not nothrow
source/mir/type_info.d(59,21): Error: nothrow function mir.type_info.mir_get_type_info!(C).mir_get_type_info.destroy_impl may throw
source/mir/rc/ptr.d(128,42): Error: template instance `mir.type_info.mir_get_type_info!(C)` error instantiating
source/mir/rc/ptr.d(225,27):        instantiated from here: __ctor!int
source/mir/rc/ptr.d(256,24):        instantiated from here: createRC!int
/home/karita/dlang/dmd-2.087.0/linux/bin64/dmd failed with exit code 1.

I do not know why this happened because everything seems to be nothrow.

@9il Do you have any idea or workaround to call createRC with the class having custom dtor?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions