Am 13.02.2014 17:52, schrieb bearophile:
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


Thanks for the info. Time to update to 2.065:)

Kind regards
André

Reply via email to