digitalmars.D.bugs - [Issue 8957] New: Closure not recognized when passing type with post-blit as lazy parameter
- d-bugmail puremagic.com (54/54) Nov 03 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8957
- d-bugmail puremagic.com (7/7) Nov 05 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8957
- d-bugmail puremagic.com (10/10) Nov 11 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8957
- d-bugmail puremagic.com (9/9) Nov 11 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8957
- d-bugmail puremagic.com (13/13) Apr 06 2013 http://d.puremagic.com/issues/show_bug.cgi?id=8957
- d-bugmail puremagic.com (7/8) Apr 06 2013 http://d.puremagic.com/issues/show_bug.cgi?id=8957
- d-bugmail puremagic.com (9/9) Apr 06 2013 http://d.puremagic.com/issues/show_bug.cgi?id=8957
- d-bugmail puremagic.com (7/11) Apr 06 2013 http://d.puremagic.com/issues/show_bug.cgi?id=8957
http://d.puremagic.com/issues/show_bug.cgi?id=8957 Summary: Closure not recognized when passing type with post-blit as lazy parameter Product: D Version: D2 Platform: All OS/Version: All Status: NEW Keywords: wrong-code Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: code klickverbot.at PDT --- This is a follow-up to the thread »Expression::apply, DeclarationExp and a possible nested context bug« on dmd-internals: http://forum.dlang.org/thread/CAP9J_HXG8mTtnojU9YwYuSGZp1NQCdY0+7oeHyoQ2WhNR-dAuw mail.gmail.com The following test case shows that the problem I brought up there there also leads to wrong-code bugs in DMD (at least I hope it's still the original problem, I simply extended this from the minimal testcase linked in the thread): --- extern(C) void printf(const char*, ...); struct HasPostblit { this(this) {}; } struct Foo { HasPostblit hp; int i; } void print(Foo f) { printf("%x\n", f.i); } auto toDg(E)(lazy E e) { return { return e(); }; } auto getDg() { Foo a; a.i = 0x1; return toDg(print(a)); } void smashStack() { int[1024] dummy = 0xcafebabe; } void main() { auto d = getDg(); smashStack(); d(); } --- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Nov 03 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8957 Quite likely to be related to at least one of the other closure bugs: bug 1841, bug 1759, bug 2148, bug 6141. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Nov 05 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8957 PST --- Don: For an analysis of why this happens and a minimal test case, see the linked dmd-internals thread (I'm fairly sure that it is correct, having spent quite some time tracking down the issue in LDC). As to whether this is related to the other bugs, I'm not sure OTOH if an intermediary DeclarationExp is also generated for them. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Nov 11 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8957 Walter Bright <bugzilla digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bugzilla digitalmars.com Severity|normal |major -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Nov 11 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8957 Iain Buclaw <ibuclaw ubuntu.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ibuclaw ubuntu.com Partial fix. https://github.com/D-Programming-Language/dmd/pull/1854 What changes is that 'Foo a' is now added to closureVars for the function getDg(). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Apr 06 2013
http://d.puremagic.com/issues/show_bug.cgi?id=8957 13:04:05 PDT ---Partial fix.What is left undone? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Apr 06 2013
http://d.puremagic.com/issues/show_bug.cgi?id=8957 Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/bea22e33b11ac8efd07081f43fac1d54d2a9aab2 Check declaration initializer expressions for nested refs. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Apr 06 2013
http://d.puremagic.com/issues/show_bug.cgi?id=8957Detection in FuncDeclaration:: needsClosure. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------Partial fix.What is left undone?
Apr 06 2013