Bug 2452 – Unimplemented method errors should show function overload

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2008-11-13T18:31:00Z
Last change time
2015-06-09T05:11:49Z
Keywords
diagnostic, pull
Assigned to
andrej.mitrovich
Creator
fraserofthenight

Comments

Comment #0 by fraserofthenight — 2008-11-13T18:31:22Z
If an interface method is not implemented in a class that implements the interface, the arguments the method takes should be shown. For example, if you have: interface IAstVisitor { void visit(VarDeclaration node); void visit(FuncDeclaration node); } class AstPrinter : IAstVisitor { void visit(VarDeclaration node) { ... } } The current error message reads: class AstPrinter interface function IAstVisitor.visit isn't implemented It should read: class AstPrinter interface function IAstVisitor.visit(FuncDeclaration) isn't implemented When you have 80 methods named "visit", telling them apart, figuring out exactly which one isn't implemented gets a bit more tricky...
Comment #1 by alienballance — 2011-05-20T07:56:31Z
I'd like to see this in D2 as well.
Comment #2 by andrej.mitrovich — 2013-01-20T12:12:14Z
Comment #3 by github-bugzilla — 2013-01-20T16:12:04Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/89543ab82e6488f04c08d4fb4c769c861fd72c2f Fixes Issue 2452 - Better diagnostic on unimplemented interface. https://github.com/D-Programming-Language/dmd/commit/a2d0e643285543850f6ae7087e183f7bd4184ce8 Merge pull request #1523 from AndrejMitrovic/Fix2452 Issue 2452 - Better diagnostic on unimplemented interface