August 11, 2019 [Issue 20119] New: "cannot inline default argument" of a mixin template alias parameter | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=20119 Issue ID: 20119 Summary: "cannot inline default argument" of a mixin template alias parameter Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: iamthewilsonator@hotmail.com --- struct S { int data; int pos = 5; private: mixin template auxdispatch(alias F, alias indx) { auto auxdispatch(int x = indx) //Error here { return F(x); } } auto dispatcher(Func...)(int a) { alias Func0 = Func[0]; return Func0!()(a); } public: void outer() { void nested()(int a) { data += a; } mixin auxdispatch!(nested,pos); auxdispatch(); import std.stdio; writeln(data); } } void main() { S s; s.outer(); } --- fails with "onlineapp.d(8): Error: cannot inline default argument this.pos" -- |
Copyright © 1999-2021 by the D Language Foundation