Error I can't fix

wron wron at mail.com
Sat Oct 10 06:59:07 UTC 2026


I have a struct
```
struct Dorm
     {
         string foo;
         string baz;
         int bar;
         Nullable!bool fooxbool;
     }
```

trying to get typeof each member with
```
class Test
{
     auto stMems(T)()
     {
         alias members = __traits(allMembers, T);
         foreach (member; members)
         {
             alias m = __traits(getMember, T, member);
             alias mtype = typeof(m);

             writeln(mtype.stringof);
         }
     }
}

```
i get the error ```Error: type `DontCallDestructorT` is not an 
expression
                 alias mtype = typeof(m);```
i have no `DontCallDestructorT` in my code

removing the Nullable works as expected. what do i do


More information about the Digitalmars-d-learn mailing list