Link error triggered by `dub test` but not by `dub build --unittest`

Per Nordlöw per.nordlow at gmail.com
Wed Jun 17 13:06:41 UTC 2020


On Wednesday, 17 June 2020 at 12:12:24 UTC, Per Nordlöw wrote:
> On Tuesday, 16 June 2020 at 12:21:26 UTC, Per Nordlöw wrote:
>> when
>>
>>     dub test
>>
>> doesn't?
>
> I'm trying to reduce it through
>
>     dustmite phobos-next "dub test 2>&1 | grep -F 
> '_D6object10_xopEqualsFMxPvMxQeZb'"
>
> Is this the best way to use dustmite in this case?

Was reduced to rational.d with content


module nxt.rational;

Rational!(I1) rational(I1, I2)(I1 , I2)
{
     return typeof(return)();
}

struct Rational(Int)
{
     bool opEquals(Rhs)(Rhs _) {}
}

@nogc unittest
{
     auto _ = rational(1, 2);
}


When I remove

     bool opEquals(Rhs)(Rhs _) {}

error goes away. Seems like a bug to me.


More information about the Digitalmars-d-learn mailing list