struct A {
void opDispatch(string name, A...)(A a) {
}
}
struct B {
void opDispatch(string name, T)(T a) {
}
}
void main()
{
A a;
a.foo(2); // ok
with (a)
{
foo(2); // fails
}
B b;
b.foo(3); // ok
with(b) {
foo(3); // fails
}
}
test.d(18): Error: function expected before (), not (*__withSym).opDispatch() of type void
test.d(25): Error: undefined identifier foo
Comment #1 by robert.schadek — 2024-12-13T19:05:49Z