You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 <typenameT>
void foo(T x, typename T::Inner y) {}
struct Bar { typedef int Inner; };
int main()
{
foo(Bar(), 0);
return 0;
}
The text was updated successfully, but these errors were encountered:
Peter Alexander (@Poita) reported this on 2013-06-01T04:10:17Z
Transferred from https://issues.dlang.org/show_bug.cgi?id=10228
CC List
Description
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; }The text was updated successfully, but these errors were encountered: