digitalmars.D.bugs - [Issue 9809] New: Need a better diagnostic on accessing 'alias this' to private symbols
- d-bugmail puremagic.com (37/38) Mar 24 2013 http://d.puremagic.com/issues/show_bug.cgi?id=9809
- d-bugmail puremagic.com (22/27) Mar 24 2013 http://d.puremagic.com/issues/show_bug.cgi?id=9809
- d-bugmail puremagic.com (11/12) Sep 17 2013 http://d.puremagic.com/issues/show_bug.cgi?id=9809
http://d.puremagic.com/issues/show_bug.cgi?id=9809 Summary: Need a better diagnostic on accessing 'alias this' to private symbols Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: andrej.mitrovich gmail.com 19:39:08 PDT --- module foo; struct S { void func() { } } struct X { public alias s this; private S s; } module test; import foo; void main() { X x; x.func(); } $ rdmd test.dtest.d(8): Error: undefined identifier 'func'I'm not exactly sure, perhaps the public alias to a private symbol should be disallowed in the first place. Otherwise a better diagnostic should be made. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Mar 24 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9809 19:42:13 PDT ---struct X { public alias s this; private S s; }Btw, the reason I needed this is because I want 's' fields/methods to be accessible, but I do not want the user to be able to assign 's' to something else. Perhaps I should have used: struct NoAssign { disable void opAssign(T...)(T t) { } S s; alias s this; } struct X { alias s this; NoAssign s; } Not too sure.. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Mar 24 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9809 Andrej Mitrovic <andrej.mitrovich gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |WORKSFORME 16:12:24 PDT --- The diagnostic in 2.063.2 is now:Error: struct foo.X member s is not accessible-- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Sep 17 2013