---
cat > test.d <<code
struct S
{
void f()(inout(Object)) inout {}
}
void main()
{
S s;
s.f(new Object);
}
code
dmd -c -o- test.d
---
test.d(8): Error: template test.S.f does not match any function template declaration. Candidates are:
test.d(3): test.S.f()(inout(Object))
test.d(8): Error: template test.S.f()(inout(Object)) cannot deduce template function from argument types !()(Object)
---
Comment #1 by verylonglogin.reg — 2013-09-23T01:19:26Z
Also it makes impossible to use Template This Parameters:
---
struct S
{
void f()(inout(void)*) inout { }
void g(this T)(inout(void)*) inout { }
}
void main()
{
S s;
void* p;
s.f!()(p); // ok
s.f(p); // error
s.g!()(p); // error
s.g!S(p); // error (works without `inout` but not sure it should)
}
---
Comment #2 by k.hara.pg — 2014-05-17T16:50:29Z
Works with 2.065.
Comment #3 by github-bugzilla — 2014-06-08T02:42:31Z