[Issue 8549] New: Bad error message with const methods
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Aug 15 06:07:33 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8549
Summary: Bad error message with const methods
Product: D
Version: D2
Platform: x86
OS/Version: Windows
Status: NEW
Keywords: diagnostic
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2012-08-15 06:07:31 PDT ---
This needs a much better error message:
struct Foo {
int[] opSlice() {
return [0];
}
}
struct Bar {
Foo spam;
const(Foo) bar() const { return spam; }
}
void main() {
Bar().bar()[];
}
DMD 2.061alpha gives:
test.d(11): Error: function test.Foo.opSlice () is not callable using argument
types ()
--
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