Am 29.01.2013 05:16, schrieb sclytrack:
> On Tuesday, 29 January 2013 at 01:09:17 UTC, F i L wrote:
>> why in the hell would you want:
>>
>>     writeln = "lolwut";
>>
>> to compile in the first place?
> 
> If you disallow this. You will have to invent something else than opDispatch.
> Something that serves them both. opPropMethodDispatch maybe.


template opDispatch(string name)
{
        static if( isAProperty!name ){
                @property int opDispatch() { return 0; }
        } else {
                void opDispatch() {}
        }
}

or similar should work.

Reply via email to