digitalmars.D.bugs - [Issue 7892] New: Compiler-generated struct copies can result in errors when ctor is disable'd
- d-bugmail puremagic.com (64/64) Apr 11 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7892
- d-bugmail puremagic.com (11/11) Apr 11 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7892
- d-bugmail puremagic.com (10/10) Sep 28 2013 http://d.puremagic.com/issues/show_bug.cgi?id=7892
- d-bugmail puremagic.com (13/13) Sep 30 2013 http://d.puremagic.com/issues/show_bug.cgi?id=7892
- d-bugmail puremagic.com (10/10) Sep 30 2013 http://d.puremagic.com/issues/show_bug.cgi?id=7892
http://d.puremagic.com/issues/show_bug.cgi?id=7892 Summary: Compiler-generated struct copies can result in errors when ctor is disable'd Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: major Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: xtzgzorex gmail.com --- Comment #0 from Alex Rønne Petersen <xtzgzorex gmail.com> 2012-04-11 19:24:34 PDT --- Two such cases: alexrp alexrp ~/Projects/tests $ cat test.d struct S { disable this(); this(int x) {} } void main() { S f() out (result) { } body { return S(1); } } alexrp alexrp ~/Projects/tests $ dmd test.d test.d(12): Error: variable test.main.f.result initializer required for type const(S) alexrp alexrp ~/Projects/tests $ cat test2.d struct S { disable this(); this(int x) {} } interface I { S f(); } class C { invariant() { } S f() { return S(1); } } void main() { } alexrp alexrp ~/Projects/tests $ dmd test2.d test2.d(19): Error: variable test2.C.f.__result initializer required for type S I bet more can be uncovered, but these are the only ones I've run into. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Apr 11 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7892 --- Comment #1 from Alex Rønne Petersen <xtzgzorex gmail.com> 2012-04-11 19:26:33 PDT --- OK, the first one is probably not due to an invisible copy, but rather just a bug in the assignment analysis (it follows that if the function returns properly, it must have returned a proper S instance, so the error is wrong). The second case is only caused when C has an invariant, since the result of every function is then stored in a temporary in order to call the invariant before exiting the function. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Apr 11 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7892 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull, rejects-valid --- Comment #2 from Kenji Hara <k.hara.pg gmail.com> 2013-09-28 23:06:13 PDT --- https://github.com/D-Programming-Language/dmd/pull/2596 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Sep 28 2013
http://d.puremagic.com/issues/show_bug.cgi?id=7892 --- Comment #3 from github-bugzilla puremagic.com 2013-09-30 04:33:03 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/1c42160f643ba3e0fc0d4fbaa24a8d357ae24965 fix Issue 7892 - Compiler-generated struct copies can result in errors when ctor is disable'd https://github.com/D-Programming-Language/dmd/commit/055fc646bb9aeba96c73c6b6e67d601b1f5d8910 Merge pull request #2596 from 9rnsr/fix7892 Issue 7892 - Compiler-generated struct copies can result in errors when ctor is disable'd -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Sep 30 2013
http://d.puremagic.com/issues/show_bug.cgi?id=7892 Andrej Mitrovic <andrej.mitrovich gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |andrej.mitrovich gmail.com Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Sep 30 2013