DMD v2.066.0-b2

David Nadlinger via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Wed Jul 9 08:39:49 PDT 2014


On Wednesday, 9 July 2014 at 14:57:01 UTC, Andrew Edwards wrote:
> My concern is that this shouldn't compile in the first place. 
> What is xyz?, Is it a free function? Is it a member variable or 
> function?  In my mind it is neither of the two so why does it 
> compile?

Oh, but that's precisely the point of opDispatch. ;) It offers a 
mechanism to respond to any members that are not found. See the 
spec for an example: 
http://dlang.org/operatoroverloading.html#Dispatch

David


More information about the Digitalmars-d-announce mailing list