[Issue 7419] [2.058/CTFE] Constructor of struct is overwritten inside a unittest with -inline

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Feb 1 22:00:24 PST 2012


http://d.puremagic.com/issues/show_bug.cgi?id=7419



--- Comment #3 from Walter Bright <bugzilla at digitalmars.com> 2012-02-01 22:00:23 PST ---
Looking at that git commit, if I add back in the following code that was
elided:

3450a3451,3459
>
> #if 1
> if (op==TOKconstruct && this->e1->op==TOKvar && this->e2->op != TOKthis
>         && this->e2->op != TOKcomma
>         && ((VarExp*)this->e1)->var->storage_class & STCref)
>         wantRef = true;
> #endif
>
>

then it works.

Note that when -inline is used, the only function that gets inlined is the
constructor call.

Note the comment for the elision, saying it is to fix something with foreach,
yet foreach is not in this example, I think the problem is in CTFE.

-- 
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