Bug 1285 – Exception typedefs not distinguished by catch
Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Linux
Creation time
2007-06-22T21:51:00Z
Last change time
2014-02-14T20:35:08Z
Keywords
EH
Assigned to
bugzilla
Creator
paching
Comments
Comment #0 by paching — 2007-06-22T21:51:08Z
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!