digitalmars.D.bugs - [Issue 20358] New: External initialization of private struct fields
- d-bugmail puremagic.com (25/25) Nov 05 2019 https://issues.dlang.org/show_bug.cgi?id=20358
https://issues.dlang.org/show_bug.cgi?id=20358 Issue ID: 20358 Summary: External initialization of private struct fields should be disallowed Product: D Version: D2 Hardware: x86_64 OS: All Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: maxsamukha gmail.com s.d: struct S { private int x; } test.d: import s; void main() { S s = {1}; // should fail to compile auto s2 = S(1); // should fail to compile } --
Nov 05 2019