Comment #0 by siegelords_abode — 2012-10-13T12:46:48Z
DMDFE 2.059 and 2.060:
struct A
{
@property
int opDispatch(string s)()
{
return 1;
}
/* Works without error if the write property is removed */
@property
void opDispatch(string s)(int val)
{
}
}
void main()
{
auto a = A();
auto b = cast(int)a.test; // test.d(19): Error: cannot cast a.opDispatch!("test")
}
Comment #1 by robert.schadek — 2024-12-13T18:01:43Z