[Issue 18892] New: Wrong type in error message for static members and alias this

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon May 21 17:00:28 UTC 2018


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

          Issue ID: 18892
           Summary: Wrong type in error message for static members and
                    alias this
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: simen.kjaras at gmail.com

struct MT {
    int _payload;
    alias _payload this;
}

unittest {
    MT a;
    a.foo = 3;  // Error: no property foo for type MT 
    MT.foo = 3; // Error: no property foo for type int 
}

I'd expect both error messages to refer to MT, not int.

--


More information about the Digitalmars-d-bugs mailing list