[Issue 7516] Postblit not called for structs returned from a ternary operator

2017-08-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7516

--- Comment #8 from github-bugzi...@puremagic.com ---
Commit pushed to dmd-cxx at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/3f497efad06f609476b4852482f8ecb24a4d33fd
Issue 7516 - Postblit not called for structs returned from a ternary operator

--


[Issue 7516] Postblit not called for structs returned from a ternary operator

2016-02-04 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7516

--- Comment #7 from github-bugzi...@puremagic.com ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/094b358ba1c5ecd6708ccd82660f44462cd06314
fix Issue 7516 - Postblit not called for structs returned from a ternary
operator

https://github.com/D-Programming-Language/dmd/commit/1ea699106e924387269681d4b54f2802a25e24d3
Merge pull request #4805 from 9rnsr/fix7516

Issue 7516 - Postblit not called for structs returned from a ternary operator

--


[Issue 7516] Postblit not called for structs returned from a ternary operator

2015-07-07 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7516

Kenji Hara k.hara...@gmail.com changed:

   What|Removed |Added

   Keywords||pull

--- Comment #6 from Kenji Hara k.hara...@gmail.com ---
https://github.com/D-Programming-Language/dmd/pull/4805

--


[Issue 7516] Postblit not called for structs returned from a ternary operator

2012-05-11 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7516


Kenji Hara k.hara...@gmail.com changed:

   What|Removed |Added

 CC||dsim...@yahoo.com


--- Comment #4 from Kenji Hara k.hara...@gmail.com 2012-05-10 23:05:16 PDT ---
*** Issue 7130 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 7516] Postblit not called for structs returned from a ternary operator

2012-05-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7516



--- Comment #3 from Kenji Hara k.hara...@gmail.com 2012-05-10 22:56:59 PDT ---
Test cases:

void main()
{
static struct S
{
int val;

this(int n) { val = n; }
this(this) { val *= 3; }
}

// cond ? lvalue : lvalue
S foo(bool f)
{
auto s1 = S(1), s2 = S(2);
return f ? s1 : s2;
}
auto s1 = foo(true);
assert(s1.val == 3);
auto s2 = foo(false);
assert(s2.val == 6);

// cond ? rvalue : rvalue
S bar(bool f)
{
return f ? S(1) : S(2);
}
auto s3 = bar(true);
assert(s3.val == 1);
auto s4 = bar(false);
assert(s4.val == 2);

// cond ? lvalue : rvalue
S baz(bool f)
{
auto s1 = S(1);
return f ? s1 : S(2);
}
auto s5 = baz(true);
assert(s5.val == 3);
auto s6 = baz(false);
assert(s6.val == 2);
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 7516] Postblit not called for structs returned from a ternary operator

2012-04-20 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7516



--- Comment #2 from SomeDude lovelyd...@mailmetrash.com 2012-04-20 01:01:16 
PDT ---
See also issue 7530

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---