[Issue 20694] New: "did you mean <a protected/private member>"
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Mar 23 02:22:22 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=20694
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 at puremagic.com
Reporter: destructionator at gmail.com
---
module a1;
class A {
protected void foo();
}
---
and
---
import a1;
void main() {
auto a = new A;
a.foo();
}
---
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
error.
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.
--
More information about the Digitalmars-d-bugs
mailing list