[Issue 12454] New: Return type inference does not work
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Mar 24 13:47:57 PDT 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12454
Summary: Return type inference does not work
Product: D
Version: D2
Platform: x86_64
OS/Version: Mac OS X
Status: NEW
Severity: major
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: yuriy.glukhov at gmail.com
--- Comment #0 from Yuriy <yuriy.glukhov at gmail.com> 2014-03-24 13:47:54 PDT ---
The code below will not compile with dmd v2.066-devel-f230a39-dirty.
string deduceRetType() {
return "1";
}
int deduceRetType() {
return 1;
}
void main() {
int qwe = deduceRetType();
}
Compiler errors:
rettype.d(15): Error: rettype.deduceRetType called with argument types ()
matches both:
rettype.d(3): rettype.deduceRetType()
and:
rettype.d(8): rettype.deduceRetType()
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list