Thread overview
[Issue 1062] New: Cannot catch typedef'd class
Mar 14, 2007
d-bugmail
Mar 26, 2007
d-bugmail
Mar 29, 2007
d-bugmail
Mar 30, 2007
d-bugmail
March 14, 2007
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!


-- 

March 26, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1062


tomas@famolsen.dk changed:

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




-- 

March 29, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1062





------- Comment #1 from thomas-dloop@kuehne.cn  2007-03-29 14:07 -------
Added to DStress as http://dstress.kuehne.cn/run/t/typedef_22_A.d http://dstress.kuehne.cn/run/t/typedef_22_B.d


-- 

March 30, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1062





------- Comment #2 from bugzilla@digitalmars.com  2007-03-29 19:06 -------
Fixed DMD 1.010


--