Bug 8787 – Virtual not abstract methods in interfaces error message

Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-10-09T01:45:00Z
Last change time
2013-02-11T22:49:41Z
Keywords
diagnostic, pull
Assigned to
andrej.mitrovich
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2012-10-09T01:45:24Z
interface Foo { void bar() {} } void main() {} DMD 2.061alpha gives: temp.d(2): Error: function temp.Foo.bar function body is not abstract in interface Foo But I suggest an error message like this because final methods are allowed in D2 interfaces: temp.d(2): Error: function temp.Foo.bar function body is not abstract or final in interface Foo
Comment #1 by andrej.mitrovich — 2012-12-27T17:14:05Z
Both are misleading because there's no such thing as an "abstract function body". A body is never abstract, only the function is. https://github.com/D-Programming-Language/dmd/pull/1416
Comment #2 by github-bugzilla — 2013-01-13T23:12:21Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/185f27951638a3f3499c4fd3975dd1962d80c3cd Fixes Issue 8787 - Better diagnostic on non-final interface function with a body. https://github.com/D-Programming-Language/dmd/commit/67ca915e3d89db564217bd6452de6c6799c01f6c Merge pull request #1416 from AndrejMitrovic/Fix8787 Issue 8787 - Better diagnostic on non-final interface function with a body
Comment #3 by github-bugzilla — 2013-02-11T12:20:16Z
Commits pushed to staging at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/185f27951638a3f3499c4fd3975dd1962d80c3cd Fixes Issue 8787 - Better diagnostic on non-final interface function with a body. https://github.com/D-Programming-Language/dmd/commit/67ca915e3d89db564217bd6452de6c6799c01f6c Merge pull request #1416 from AndrejMitrovic/Fix8787
Comment #4 by github-bugzilla — 2013-02-11T22:49:41Z
Commits pushed to https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/185f27951638a3f3499c4fd3975dd1962d80c3cd Fixes Issue 8787 - Better diagnostic on non-final interface function with a body. https://github.com/D-Programming-Language/dmd/commit/67ca915e3d89db564217bd6452de6c6799c01f6c Merge pull request #1416 from AndrejMitrovic/Fix8787