Thread overview
[Issue 1285] New: Exception typedefs not distinguished by catch
Jun 23, 2007
d-bugmail
Jun 23, 2007
d-bugmail
Jul 01, 2007
d-bugmail
June 23, 2007
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!


-- 

June 23, 2007
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




-- 

July 01, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1285


bugzilla@digitalmars.com changed:

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




------- Comment #1 from bugzilla@digitalmars.com  2007-07-01 14:08 -------
Fixed DMD 1.018 and DMD 2.002


--