www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1062] New: Cannot catch typedef'd class

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

           Summary: Cannot catch typedef'd class
           Product: D
           Version: 1.009
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: tomas famolsen.dk


This wont compile:

typedef Exception TypedefException;

void main()
{
    try
    {
    }
    catch(TypedefException e)
    {
    }
}

Gives you:
Error: can only catch class objects, not 'TypedefException'

After a little discussion on IRC it seems there is an inconsistency as a class
derived from TypedefException will work just fine. Either both should work or
none of them should!


-- 
Mar 14 2007
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1062


tomas famolsen.dk changed:

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




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






Added to DStress as
http://dstress.kuehne.cn/run/t/typedef_22_A.d
http://dstress.kuehne.cn/run/t/typedef_22_B.d


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






Fixed DMD 1.010


-- 
Mar 29 2007