digitalmars.D.bugs - [Issue 22433] New: ITFI fails with alias declared inside template,
- d-bugmail puremagic.com (34/34) Oct 23 2021 https://issues.dlang.org/show_bug.cgi?id=22433
https://issues.dlang.org/show_bug.cgi?id=22433 Issue ID: 22433 Summary: ITFI fails with alias declared inside template, used in function signature Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: iamthewilsonator hotmail.com template foo(I) { alias Idx = int; void foo(I,Idx,int) {} } struct A {} void main() { A a; //Fails: // Error: undefined identifier `Idx`" // Error: template `onlineapp.write` cannot deduce function from argument types `!()(A, int, int)`, candidates are: // `foo(I)(I, Idx, int)` a.foo(0,0); // 1 //Passes a.foo!A(0,0); // 2 } reordering the statements 1 and 2 still results in failure. --
Oct 23 2021