Comment #0 by eatingstaples — 2011-01-21T16:05:06Z
Created attachment 875
Code demonstrating the issue
An object typed as const will have const members, and a class declared as const
will have const members, but a class typed as const does not have const
members.
Comment #1 by lovelydear — 2012-04-22T15:28:33Z
The example code in attachment is:
import std.stdio;
class A
{
int b;
}
void main()
{
const A a = new A;
writeln(typeof(a).stringof); // const(A)
writeln(typeof(a.b).stringof); // const(int)
writeln((const A).stringof); // const(A)
writeln(typeof((const A).b).stringof); // int, should be const(int)
}