On Tuesday, 16 April 2013 at 07:55:51 UTC, Denis Shelomovskij
wrote:
Sorry, I really don't understand what you don't understand.
Let's consider example from Issue 9603 Comment 2 [1]. Do you
think such code must not work?
Also you can look through Issue 9601 discussion.
[1] http://d.puremagic.com/issues/show_bug.cgi?id=9603#c2
[2] http://d.puremagic.com/issues/show_bug.cgi?id=9601
The code in 9603 is completely broken. It should compile and run,
but what it does is undefined as o is finalized when delegates
have reference to it.
I don't see how changing delegate into object would change
anything, as the code would be broken in the same way for the
same reason.