Thread overview
[Issue 1595] Multiple typedefs of Exception should be treated as different types.
Oct 19, 2007
d-bugmail
Oct 20, 2007
d-bugmail
Oct 20, 2007
d-bugmail
Oct 20, 2007
d-bugmail
Feb 05, 2012
Yao Gomez
[Issue 1595] (D1 only) Multiple typedefs of Exception should be treated as different types.
Feb 05, 2012
yebblies
October 19, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1595


dvdfrdmn@users.sf.net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement
          Component|glue layer                  |DMD
            Product|DGCC aka GDC                |D
            Version|0.24                        |1.022




------- Comment #1 from dvdfrdmn@users.sf.net  2007-10-19 16:20 -------
This is a language issue.  Changing to enhancement request and reassigning to Walter.


-- 

October 20, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1595


thomas-dloop@kuehne.cn changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|dvdfrdmn@users.sf.net       |bugzilla@digitalmars.com
         OS/Version|Linux                       |All
           Platform|PC                          |All
            Version|1.022                       |1.018




------- Comment #2 from thomas-dloop@kuehne.cn  2007-10-20 02:04 -------
David, what part of the typedef / try-catch documentation renders this issue an enhancement instead of a bug?

Added to DStress as http://dstress.kuehne.cn/run/c/catch_08_A.d http://dstress.kuehne.cn/run/c/catch_08_B.d http://dstress.kuehne.cn/run/c/catch_08_C.d http://dstress.kuehne.cn/run/c/catch_08_D.d http://dstress.kuehne.cn/run/c/catch_08_E.d http://dstress.kuehne.cn/run/c/catch_08_F.d http://dstress.kuehne.cn/run/c/catch_08_G.d


-- 

October 20, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1595





------- Comment #3 from dvdfrdmn@users.sf.net  2007-10-20 06:54 -------
Exception handling is based on class inheritance.  Supporting typedefs (using TypeInfo RTTI) is above and beyond what is described in the spec.


-- 

October 20, 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1595





------- Comment #4 from thomas-dloop@kuehne.cn  2007-10-20 10:31 -------
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".


-- 

February 05, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=1595


Yao Gomez <yao.gomez@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |yao.gomez@gmail.com


--- Comment #5 from Yao Gomez <yao.gomez@gmail.com> 2012-02-04 22:32:00 PST ---
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?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 05, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=1595


yebblies <yebblies@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |yebblies@gmail.com
            Version|1.018                       |D1
            Summary|Multiple typedefs of        |(D1 only) Multiple typedefs
                   |Exception should be treated |of Exception should be
                   |as different types.         |treated as different types.


--- Comment #7 from yebblies <yebblies@gmail.com> 2012-02-05 18:41:43 EST ---
Yes, the individual versions are not used any more.  Having (D1 only) as a prefix in the title also helps differentiate the bugs.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------