Bug 1062 – Cannot catch typedef'd class

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Linux
Creation time
2007-03-14T17:38:00Z
Last change time
2014-02-16T15:25:42Z
Keywords
rejects-valid
Assigned to
bugzilla
Creator
tomas

Comments

Comment #0 by tomas — 2007-03-14T17:38:32Z
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!
Comment #1 by thomas-dloop — 2007-03-29T14:07:12Z
Comment #2 by bugzilla — 2007-03-29T19:06:43Z
Fixed DMD 1.010