[Issue 3642] Poor error message: function ___ not callable with argument types ___

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Aug 16 04:56:34 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=3642


Jacob Carlborg <doob at me.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |doob at me.com
            Version|2.036                       |future


--- Comment #4 from Jacob Carlborg <doob at me.com> 2012-08-16 04:56:31 PDT ---
I've hit this error a couple of times and it can be really annoying. I always
think I'm missing an argument. For example:

module test;

struct Foo
{
    void foo () const
    {
        auto b = bar;
    }

    bool bar ()
    {
        return false;
    }
}

Compile the above code with DMD 2.060 results in:

Error: function test.Foo.bar () is not callable using argument types ()

If I add parentheses when calling "bar", I get a better error message:

Error: function test.Foo.bar () is not callable using argument types () const

Where it actually mentions "const". Although the error message could be even
better than this.

-- 
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