[Issue 2437] ICE(tocsym.c, !needThis()) - default struct argument

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Sep 3 00:28:54 PDT 2009


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


Don <clugdbug at yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|patch                       |




--- Comment #3 from Don <clugdbug at yahoo.com.au>  2009-09-03 00:28:53 PDT ---
Aargh, patch is incorrect. I think the patch does fix a genuine problem (it
seems to be necessary to allow you to evaluate a struct constructor in CTFE),
but there's a second problem as well.

It may be because a struct constructor such as aStruct(44) turns into 
((aStruct __ctmp2;) , __ctmp2).this(44)

And that __ctmp2 is a funny beast. Where is it stored? Its parent is the
*MODULE*, not the function it's called from. But it's not a static variable.
Weird.

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