[Issue 6755] New: Better wrong function pointer error message
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Oct 1 17:26:49 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6755
Summary: Better wrong function pointer error message
Product: D
Version: D2
Platform: Other
OS/Version: Windows
Status: NEW
Keywords: diagnostic
Severity: minor
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2011-10-01 17:26:10 PDT ---
void bar(void function(const int) f) {}
void foo(const float c) {}
void main() {
bar(&foo);
}
DMD 2.056head gives:
test.d(4): Error: function test.bar (void function(const const(int)) f) is not
callable using argument types (void function(const const(float) c))
test.d(4): Error: cannot implicitly convert expression (& foo) of type void
function(const const(float) c) to void function(const const(int))
I'd like it to print "const(int)" or "const int" instead "const const(int)".
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list