What    |Removed                     |Added
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |
           Severity|normal                      |enhancement

--- Comment #4 from 2012-10-21 14:09:55 PDT ---
I reopen this as enhancement request because I think the error message is not
good enough still. See Issue 8549 for more info.

This program:

struct Foo {
    int[] opSlice() {
        return [0];
struct Bar {
    Foo spam;
    const(Foo) bar() const { return spam; }
void main() {

Currently gives:

test.d(11): Error: function test.Foo.opSlice () is not callable using argument
types () const

In Issue 8549 Andrej Mitrovic suggests an error message similar to:

Error: function test.Foo.opSlice () is not callable using const(this)

But I think a better error message, more newbie-friendly, tells the programmer
how to fix the problem, (not complete error message):

test.d(11): Error: function test.Foo.opSlice() needs to be const to [...]

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to