[Issue 17120] New: error messages from wrong overload
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Tue Jan 24 16:26:29 PST 2017
https://issues.dlang.org/show_bug.cgi?id=17120
Issue ID: 17120
Summary: error messages from wrong overload
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: critical
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: john.loughran.colvin at gmail.com
struct S(size_t _)
{
// void foo(size_t i)(S!(i) rhs){} //OK
void foo(size_t i)(S!(+i) rhs){} //Error
void foo(){}
}
void main()
{
S!4 v1;
v1.foo();
}
test.d(4): Error: undefined identifier 'i'
Also, if I comment out the `void foo(){}` overload the compiler still complains
about the undefined identifier, but also prints the "cannot deduce function
from argument types" as expected.
--
More information about the Digitalmars-d-bugs
mailing list