www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 18892] New: Wrong type in error message for static members

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 puremagic.com
          Reporter: simen.kjaras 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.

--
May 21 2018