https://issues.dlang.org/show_bug.cgi?id=12746
Issue ID: 12746
Summary: Wrong overload access within manually aliased
eponymous function template
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Keywords: accepts-invalid
Severity: major
Priority: P1
Component: DMD
Assignee: [email protected]
Reporter: [email protected]
This is invalid code, but incorrectly accepted and asserts in runtime.
template foo()
{
void bar()
{
bar(1); // incorrectly call foo(int)
}
alias foo = bar;
}
void foo(int)
{
assert(0);
}
void main()
{
foo();
}
--