[Issue 20274] New: IFTI fails for opDispatch and 'with'
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Oct 6 20:49:34 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=20274
Issue ID: 20274
Summary: IFTI fails for opDispatch and 'with'
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: maxsamukha at gmail.com
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
--
More information about the Digitalmars-d-bugs
mailing list