In the below code, "A[] found" is never printed. What's the proper way to check for this type?

import std.stdio;
import std.traits : FieldNameTuple;

class A { }
class B
{
    string foo;
    string baa;
    A[] list;
}

void main()
{
    static foreach(field; FieldNameTuple!B)
        {
       static if(is(typeof(__traits(getMember, B, field) == A[])))
       {
           writeln("A[] found");
       }
    }
    writeln("done");
}



Reply via email to