www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 4507] New: use spellchecker when override function doesn't override anything

reply d-bugmail puremagic.com writes:
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 puremagic.com
        ReportedBy: mrmocool gmx.de



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: -------
Jul 26 2010
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4507




k, had a quick look, obviously FuncDeclaration::findVtblIndex would need to be
modified.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 26 2010
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4507




Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/945772cd984d7f6c469ffcbedb0a33711e5d3471
fix issue 4507

https://github.com/D-Programming-Language/dmd/commit/641cc658ef2b11d44b3c3239378be6d8afbd1d09


fix issue 4507

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 12 2012
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4507


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |FIXED
           Severity|normal                      |enhancement


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 12 2012