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


Walter Bright <bugzi...@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzi...@digitalmars.com


--- Comment #1 from Walter Bright <bugzi...@digitalmars.com> 2011-03-06 
10:16:43 PST ---
The reason this does not work is because the instantiation of the doStuff()
function would require *two* context pointers:

1. a 'this' pointer to the object Foo
2. a 'this' pointer to the stack frame of main()

and there can be only one.

It will work if you declare add() as being static, because then you're saying
that it does not need a context pointer to main().

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

Reply via email to