[Issue 6048] struct methods included in .tupleof

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon May 23 15:29:38 PDT 2011


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


kennytm at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kennytm at gmail.com


--- Comment #1 from kennytm at gmail.com 2011-05-23 15:25:24 PDT ---
This is expected. An inner struct contains a context pointer to the scope. Use
'static struct' and that 'void*' member will be gone. To illustrate:

-----------------------------------
void main() {
    struct S{ void a(){} }
    static struct T{ void b(){} }
    pragma(msg, S.tupleof);
    pragma(msg, T.tupleof);
}
-----------------------------------
tuple((S).this)
tuple()
-----------------------------------

(Although changing that struct to 'static struct' causes a forward-reference
error)

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