www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 561] New: Incorrect duplicate error messagae when trying to create instance of interface

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=561

           Summary: Incorrect duplicate error messagae when trying to create
                    instance of interface
           Product: D
           Version: 0.174
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: diagnostic
          Severity: minor
          Priority: P3
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: deewiant gmail.com


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.


-- 
Nov 18 2006
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=561


deewiant gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Incorrect duplicate error   |Incorrect duplicate error
                   |messagae when trying to     |message when trying to
                   |create instance of interface|create instance of interface





Damn typos.


-- 
Nov 18 2006
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=561


deewiant gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch





This should be easy to fix. expression.c, line 2756, change from:

if (cd->isAbstract())

To:

else if (cd->isAbstract())


-- 
Mar 23 2007
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=561


bugzilla digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED





Fixed DMD 1.019 and 2.003


-- 
Jul 30 2007