On Wednesday, 11 February 2015 at 18:40:05 UTC, Freddy wrote:
Is the intended behavior?

Yes. test2 returns a delegate that closes over a separate copy of the local variable, so the data pointer is different each time.

You can get the two pointers with .funcptr and .ptr. You'll find .funcptr is the same but .ptr changes.

Reply via email to