Bug 10228 – Type deduction fails with dependencies between parameter types

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-06-01T04:10:17Z
Last change time
2024-12-13T18:07:22Z
Assigned to
No Owner
Creator
Peter Alexander
See also
https://issues.dlang.org/show_bug.cgi?id=9024
Moved to GitHub: dmd#18593 →

Comments

Comment #0 by peter.alexander.au — 2013-06-01T04:10:17Z
This fails with the error: "undefined identifier T.Inner" in 2.063 void foo(T)(T x, T.Inner y) {} struct Bar { alias int Inner; }; void main() { foo(Bar(), 0); } Calling foo!Bar works. I don't know if this is really a bug, or an enhancement request, but analogous code works in C++: template <typename T> void foo(T x, typename T::Inner y) {} struct Bar { typedef int Inner; }; int main() { foo(Bar(), 0); return 0; }
Comment #1 by robert.schadek — 2024-12-13T18:07:22Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18593 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB