[Issue 20884] New: Using getMember with a type as first argument can lose type qualifiers.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat May 30 13:14:43 UTC 2020


https://issues.dlang.org/show_bug.cgi?id=20884

          Issue ID: 20884
           Summary: Using getMember with a type as first argument can lose
                    type qualifiers.
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: boris2.9 at gmail.com

code taken from bug 13343

struct S
{
  int x;
}

alias T = immutable(S);

pragma(msg, typeof(__traits(getMember, T, "x")).stringof);
pragma(msg, typeof(T.x).stringof);

Output:

  1>int
  1>immutable(int)

--


More information about the Digitalmars-d-bugs mailing list