www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1285] New: Exception typedefs not distinguished by catch

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

           Summary: Exception typedefs not distinguished by catch
           Product: D
           Version: 2.000
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Keywords: EH
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: paching gmail.com


typedef Exception A;
typedef Exception B;

void main() {
  try {
    throw new A("test");
  }
  catch (B) {
    // this shouldn't happen, but does
  }
  catch (A) {
    // this ought to happen?
  }
}

Note, however, that dmd doesn't complain that the first catch masks the second,
unlike when I write "catch (Exception) {...} catch (A) {...}." Something's up!


-- 
Jun 22 2007
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1285


paching gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |paching gmail.com
           Severity|normal                      |minor
           Priority|P2                          |P3




-- 
Jun 22 2007
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1285


bugzilla digitalmars.com changed:

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





Fixed DMD 1.018 and DMD 2.002


-- 
Jul 01 2007