Struct with opDispatch doesn't dispatch. Is this a bug?

Meta jared771 at gmail.com
Thu Jul 4 20:12:35 PDT 2013


I wasn't 100% sure the following is a bug, so I figured I'd ask.

struct Fail
{
	void opDispatch(string s)()
	{
		static assert(false, "Tried to call a method on Fail");
	}
}

void main()
{
         auto fail = Fail();
         fail.s(); //Error: no property 's' for type 'Fail'
}


More information about the Digitalmars-d-learn mailing list