Exception handling is based on class inheritance. Supporting typedefs (using TypeInfo RTTI) is above and beyond what is described in the spec.
Comment #4 by thomas-dloop — 2007-10-20T10:31:48Z
http://www.digitalmars.com/d/declaration.html
# Strong types can be introduced with the typedef. Strong
# types are semantically a distinct type to the type checking
# system, for function overloading, and for the debugger.
As far as I understand the quote, typedefs create distinct types.
For classes I always asumed that
#
# typedef Master Slave;
#
was syntactic sugar for
#
# class Slave : Master{
# this(...){
# super.this(...);
# }
# }
#
however the current implementation only creates a
strong-at-compiletime and weak-at-runtime type.
Test code:
# import std.stdio;
#
# class Master{
# }
#
# typedef Master Slave;
#
# void main(){
# Object o;
#
# o = new Master(); // 1
# writefln("1: %s", o);
#
# o = new Slave(); // 2
# writefln("2: %s", o);
# }
As the debugger currently can't differentiate the types of object
1 and 2 I'd rate this a general bug that was triggered in this case
by "catch".
Comment #5 by yao.gomez — 2012-02-04T22:32:00Z
This is a D1 only issue (obviously, as D2 will deprecate typedef). However, the version currently selected is 1.018. What should be done with this reports (besides fixing them) with specific version? Should be changed to the more generic D1?
Comment #6 by yao.gomez — 2012-02-04T22:58:06Z
(In reply to comment #5)
> This is a D1 only issue (obviously, as D2 will deprecate typedef). However, the
> version currently selected is 1.018. What should be done with this reports
> (besides fixing them) with specific version? Should be changed to the more
> generic D1?
s/this reports/these bug reports
Comment #7 by yebblies — 2012-02-04T23:41:43Z
Yes, the individual versions are not used any more. Having (D1 only) as a prefix in the title also helps differentiate the bugs.
Comment #8 by razvan.nitu1305 — 2019-07-13T11:42:17Z
Closing as WONTFIX as D1 is not supported anymore.