digitalmars.D.bugs - [Issue 8704] New: Invalid nested struct constructions should be detected
- d-bugmail puremagic.com (34/34) Sep 21 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8704
- d-bugmail puremagic.com (10/10) Sep 21 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8704
- d-bugmail puremagic.com (26/26) Sep 21 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8704
http://d.puremagic.com/issues/show_bug.cgi?id=8704 Summary: Invalid nested struct constructions should be detected Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: accepts-invalid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: k.hara.pg gmail.com --- Comment #0 from Kenji Hara <k.hara.pg gmail.com> 2012-09-21 07:03:47 PDT --- By fixing issue 8339, invalid accessing to nested struct shows compile error. But, some cases are still accidentally accepted. void check(T)() { // nested struct constructions outside valid frame scope T t1 = T(); T t2 = T(1); } void main() { struct S { int n; void foo(){} } check!S(); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Sep 21 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8704 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull --- Comment #1 from Kenji Hara <k.hara.pg gmail.com> 2012-09-21 07:08:49 PDT --- https://github.com/D-Programming-Language/dmd/pull/1133 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Sep 21 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8704 Andrej Mitrovic <andrej.mitrovich gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrej.mitrovich gmail.com --- Comment #2 from Andrej Mitrovic <andrej.mitrovich gmail.com> 2012-09-21 08:25:16 PDT --- What exact rules does the language define for these function-nested types? It seems arbitrary that some things are allowed while others are not, for example this works: void check(T)() { T t = T.init; t.foo(); } void main() { struct S { int n; void foo(){} } check!S(); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Sep 21 2012