The following code yields results as commented.
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)
Sean Eskapp wrote:
The following code yields results as commented.
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)