[Issue 4437] copy construction bug with "return this;"
http://d.puremagic.com/issues/show_bug.cgi?id=4437 Kenji Hara changed: What|Removed |Added CC||cristi.cobzare...@gmail.com --- Comment #6 from Kenji Hara 2012-04-24 18:19:32 PDT --- *** Issue 6195 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4437] copy construction bug with "return this;"
http://d.puremagic.com/issues/show_bug.cgi?id=4437 Walter Bright changed: What|Removed |Added Status|NEW |RESOLVED CC||bugzi...@digitalmars.com Resolution||FIXED --- Comment #5 from Walter Bright 2011-03-31 15:48:21 PDT --- https://github.com/D-Programming-Language/dmd/commit/52dd808de9d6ec904d3ca60a8bdbd4b276a5b15b -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4437] copy construction bug with "return this;"
http://d.puremagic.com/issues/show_bug.cgi?id=4437 --- Comment #4 from Andrei Alexandrescu 2011-02-27 06:37:43 PST --- Great fix! I changed my votes to vote this... -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4437] copy construction bug with "return this;"
http://d.puremagic.com/issues/show_bug.cgi?id=4437 Kenji Hara changed: What|Removed |Added CC||k.hara...@gmail.com --- Comment #3 from Kenji Hara 2011-02-26 23:03:46 PST --- Following patch fixes this bug. src/s2ir.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/s2ir.c b/src/s2ir.c index 08d802b..982adfc 100644 --- a/src/s2ir.c +++ b/src/s2ir.c @@ -1247,7 +1247,7 @@ void ReturnStatement::toIR(IRState *irs) */ Type *tb = exp->type->toBasetype(); //if (tb->ty == Tstruct) exp->dump(0); -if ((exp->op == TOKvar || exp->op == TOKdotvar || exp->op == TOKstar) && +if ((exp->op == TOKvar || exp->op == TOKdotvar || exp->op == TOKstar || exp->op == TOKthis) && tb->ty == Tstruct) { StructDeclaration *sd = ((TypeStruct *)tb)->sym; if (sd->postblit) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4437] copy construction bug with "return this;"
http://d.puremagic.com/issues/show_bug.cgi?id=4437 Brad Roberts changed: What|Removed |Added CC||bra...@puremagic.com --- Comment #2 from Brad Roberts 2010-12-10 00:32:40 PST --- I'm 99% sure this is a dup of bug 3516 or together they form the basis of a more general ticket: structs and their postblit and dtors are just mostly unimplmented. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4437] copy construction bug with "return this;"
http://d.puremagic.com/issues/show_bug.cgi?id=4437 Don changed: What|Removed |Added Severity|normal |critical -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 4437] copy construction bug with "return this;"
http://d.puremagic.com/issues/show_bug.cgi?id=4437 Shin Fujishiro changed: What|Removed |Added CC||rsi...@gmail.com --- Comment #1 from Shin Fujishiro 2010-09-18 14:32:47 PDT --- Reduced test case: test.d void main() { S s; auto t = s.copy(); assert(t.count == 1); // (5) } struct S { int count; this(this) { ++count; } S copy() { return this; } } % dmd -run test.d core.exception.asserter...@test(5): Assertion failure -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---