Bug 561 – Incorrect duplicate error message when trying to create instance of interface

Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P3
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2006-11-18T10:38:00Z
Last change time
2014-02-15T13:22:13Z
Keywords
diagnostic, patch
Assigned to
bugzilla
Creator
matti.niemenmaa+dbugzilla

Comments

Comment #0 by matti.niemenmaa+dbugzilla — 2006-11-18T10:38:54Z
interface D { void foo(); } void main() { D d = new D(); } The above code errors out with: asdf.d(7): Error: cannot create instance of interface D asdf.d(7): Error: cannot create instance of abstract class D Huh? Abstract class? That's an interface, not an abstract class. The first error message is expected, the second is both incorrect and superfluous.
Comment #1 by matti.niemenmaa+dbugzilla — 2006-11-18T10:47:06Z
Damn typos.
Comment #2 by matti.niemenmaa+dbugzilla — 2007-03-23T12:22:04Z
This should be easy to fix. expression.c, line 2756, change from: if (cd->isAbstract()) To: else if (cd->isAbstract())
Comment #3 by bugzilla — 2007-07-30T15:46:52Z
Fixed DMD 1.019 and 2.003