www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 20694] New: "did you mean <a protected/private member>"


          Issue ID: 20694
           Summary: "did you mean <a protected/private member>"
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: minor
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: destructionator gmail.com

module a1;
class A {
        protected void foo();


import a1;

void main() {
        auto a = new A;

a2.d(5): Error: no property foo for type a1.A, did you mean a1.A.foo?

It works if public of course, but if protected or private it gives a silly

on private, it should probably not suggest anything; private members are
supposed to be invisible. But the protected case should probably explicitly
call out that it is protected and thus inaccessible.

Mar 22 2020