[Issue 4437] copy construction bug with "return this;"
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Feb 26 23:06:40 PST 2011
http://d.puremagic.com/issues/show_bug.cgi?id=4437
Kenji Hara <k.hara.pg at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |k.hara.pg at gmail.com
--- Comment #3 from Kenji Hara <k.hara.pg at gmail.com> 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: -------
More information about the Digitalmars-d-bugs
mailing list