Andre:

could you have a look whether this is a bug with tupleof?
In case you have a const string with a default value,
the attribute is not in the tupleof list.

struct A {
        const string a = "abc";
        string d;
}

void main(){
        assert(A().tupleof.length == 2); // fails -> length = 1
}

Tupleeof is working correctly here. Currently const/immutable fields don't become struct instance fields. After a transition phase this will be changed, and in some months you will see two fields there. DMD 2.065 has a warning on this.

Bye,
bearophile

Reply via email to