[Issue 6981] New: incorrect error message when calling method without parentheses

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Nov 20 13:49:49 PST 2011


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

           Summary: incorrect error message when calling method without
                    parentheses
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: diagnostic
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: mrmocool at gmx.de


--- Comment #0 from Trass3r <mrmocool at gmx.de> 2011-11-20 13:48:56 PST ---
class Document
{
    const
    override hash_t toHash()
    {
        return super.toHash;
    }
}

Error: function object.Object.toHash () is not callable using argument types ()

If you change it into 'return super.toHash();' then it prints
Error: function object.Object.toHash () is not callable using argument types ()
const

OT: I really wish that horrible error message would be turned into something
more easily understandable like 'function can't be called on a const instance'
or whatever.

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