[Issue 4507] New: use spellchecker when override function doesn't override anything

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jul 26 07:17:50 PDT 2010


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

           Summary: use spellchecker when override function doesn't
                    override anything
           Product: D
           Version: D1 & 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> 2010-07-26 07:17:49 PDT ---
interface Foo
{
    void tranform();
}

class Bar : Foo
{
    override void transform()
    {
    }
}

override.d(8): Error: function override.Bar.transform does not override any
function

Omitting override gives the equally useless message:
override.d(6): Error: class override.Bar interface function Foo.tranform isn't
implemented

I once spent a lot of time to figure out the cause of this error because the
missing 's' is hardly noticeable.
Why doesn't dmd use its spellchecker to help here?


Similar problem is if the name is correct but parameters or other things don't
match. In this case dmd should also suggest something like "did you mean
transform(f) instead of transform(const f)" 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