[Issue 12746] New: Wrong overload access within manually aliased eponymous function template
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Wed May 14 06:06:28 PDT 2014
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: nobody at puremagic.com
Reporter: k.hara.pg at gmail.com
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();
}
--
More information about the Digitalmars-d-bugs
mailing list