[Issue 16957] access function from inside template with same name
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu Dec 8 04:54:00 PST 2016
https://issues.dlang.org/show_bug.cgi?id=16957
--- Comment #2 from John Colvin <john.loughran.colvin at gmail.com> ---
template a(alias b)
{
alias T = typeof(b);
auto a(T ret)
{
return ret;
}
}
auto a(T, size_t N)(T[N] a) {} // breaks
// auto a(T)(T[] a) {} // OK
void main()
{
int x;
auto b = a!(x);
}
test.d(5): Error: undefined identifier 'T'
test.d(16): Error: cannot infer type from template instance a!(x)
--
More information about the Digitalmars-d-bugs
mailing list