comparison run/c/catch_08_F.d @ 1568:afe5f4bc8f9c

[Issue 1595] Multiple typedefs of Exception should be treated as different types. <pop.atry@gmail.com> 2007-10-07 http://d.puremagic.com/issues/show_bug.cgi?id=1595
author thomask
date Fri, 19 Oct 2007 17:07:50 +0000
parents
children
comparison
equal deleted inserted replaced
1567:54833ea51c6f 1568:afe5f4bc8f9c
1 // $HeadURL$
2 // $Date$
3 // $Author$
4
5 // @author@ <pop.atry@gmail.com>
6 // @date@ 2007-10-07
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1595
8 // @desc@ [Issue 1595] Multiple typedefs of Exception should be treated as different types.
9
10 module dstress.run.c.catch_08_F;
11
12 class Base{
13 }
14
15 typedef Base Cat;
16 typedef Base Dog;
17
18 int main(){
19 try{
20 throw new Dog();
21 }catch(Dog d){
22 return 0;
23 }catch(Cat c){
24 assert(0);
25 }catch(Base b){
26 assert(0);
27 }
28 assert(0);
29 }
30