[Issue 5473] Members of const-qualified classes are not const themselves.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Apr 22 15:27:34 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=5473


SomeDude <lovelydear at mailmetrash.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lovelydear at mailmetrash.com


--- Comment #1 from SomeDude <lovelydear at mailmetrash.com> 2012-04-22 15:28:33 PDT ---
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)
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list