Bug 9708 – inout breaks zero parameter IFTI

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-03-12T15:11:00Z
Last change time
2015-06-09T05:14:52Z
Keywords
rejects-valid
Assigned to
nobody
Creator
nilsbossung

Comments

Comment #0 by nilsbossung — 2013-03-12T15:11:53Z
--- 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