Unittest Absurdity

Steven Schveighoffer schveiguy at gmail.com
Fri Aug 5 15:24:16 UTC 2022


On 8/4/22 10:27 PM, jfondren wrote:
> 
> The output's not that useful...
> 
> ```d
> import object;
> struct S
> {
>      int n;
>      void opOpAssign(string op)(S rhs) if (op == "/=")
>      {
>          n++;
>      }
>      void opOpAssign(string op)(S rhs) if (op == "/")
>      {
>      }
> }
> unittest
> {
>      S a = S(1);
>      S b = S(2);
>      a.opOpAssign(b);
>      b.opOpAssign(a);

oof, I expected this to include the template parameters! I believe it 
normally does?

This is a bug that should be filed.

-Steve


More information about the Digitalmars-d-learn mailing list