[Issue 20531] New: Error message for invalid private data access very confusing
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Jan 24 03:44:01 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=20531
Issue ID: 20531
Summary: Error message for invalid private data access very
confusing
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Keywords: diagnostic
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: schveiguy at yahoo.com
--- mod1.d
module mod1;
struct S
{
private int x;
}
--- mod2.d
module mod2;
import mod1;
void main()
{
S s;
int x = s.x;
}
---
Error: no property `x` for type `S`, did you mean `mod1.S.x`?
I would expect it to complain that either x doesn't exist or is not accessible.
It's not helpful to say I should try doing what I actually did...
--
More information about the Digitalmars-d-bugs
mailing list