annotate run/c/catch_08_E.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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1568
afe5f4bc8f9c [Issue 1595] Multiple typedefs of Exception should be treated as different types.
thomask
parents:
diff changeset
1 // $HeadURL$
afe5f4bc8f9c [Issue 1595] Multiple typedefs of Exception should be treated as different types.
thomask
parents:
diff changeset
2 // $Date$
afe5f4bc8f9c [Issue 1595] Multiple typedefs of Exception should be treated as different types.
thomask
parents:
diff changeset
3 // $Author$
afe5f4bc8f9c [Issue 1595] Multiple typedefs of Exception should be treated as different types.
thomask
parents:
diff changeset
4
afe5f4bc8f9c [Issue 1595] Multiple typedefs of Exception should be treated as different types.
thomask
parents:
diff changeset
5 // @author@ <pop.atry@gmail.com>
afe5f4bc8f9c [Issue 1595] Multiple typedefs of Exception should be treated as different types.
thomask
parents:
diff changeset
6 // @date@ 2007-10-07
afe5f4bc8f9c [Issue 1595] Multiple typedefs of Exception should be treated as different types.
thomask
parents:
diff changeset
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1595
afe5f4bc8f9c [Issue 1595] Multiple typedefs of Exception should be treated as different types.
thomask
parents:
diff changeset
8 // @desc@ [Issue 1595] Multiple typedefs of Exception should be treated as different types.
afe5f4bc8f9c [Issue 1595] Multiple typedefs of Exception should be treated as different types.
thomask
parents:
diff changeset
9
afe5f4bc8f9c [Issue 1595] Multiple typedefs of Exception should be treated as different types.
thomask
parents:
diff changeset
10 module dstress.run.c.catch_08_E;
afe5f4bc8f9c [Issue 1595] Multiple typedefs of Exception should be treated as different types.
thomask
parents:
diff changeset
11
afe5f4bc8f9c [Issue 1595] Multiple typedefs of Exception should be treated as different types.
thomask
parents:
diff changeset
12 class Base{
afe5f4bc8f9c [Issue 1595] Multiple typedefs of Exception should be treated as different types.
thomask
parents:
diff changeset
13 }
afe5f4bc8f9c [Issue 1595] Multiple typedefs of Exception should be treated as different types.
thomask
parents:
diff changeset
14
afe5f4bc8f9c [Issue 1595] Multiple typedefs of Exception should be treated as different types.
thomask
parents:
diff changeset
15 typedef Base Cat;
afe5f4bc8f9c [Issue 1595] Multiple typedefs of Exception should be treated as different types.
thomask
parents:
diff changeset
16 typedef Base Dog;
afe5f4bc8f9c [Issue 1595] Multiple typedefs of Exception should be treated as different types.
thomask
parents:
diff changeset
17
afe5f4bc8f9c [Issue 1595] Multiple typedefs of Exception should be treated as different types.
thomask
parents:
diff changeset
18 int main(){
afe5f4bc8f9c [Issue 1595] Multiple typedefs of Exception should be treated as different types.
thomask
parents:
diff changeset
19 try{
afe5f4bc8f9c [Issue 1595] Multiple typedefs of Exception should be treated as different types.
thomask
parents:
diff changeset
20 throw new Cat();
afe5f4bc8f9c [Issue 1595] Multiple typedefs of Exception should be treated as different types.
thomask
parents:
diff changeset
21 }catch(Dog d){
afe5f4bc8f9c [Issue 1595] Multiple typedefs of Exception should be treated as different types.
thomask
parents:
diff changeset
22 assert(0);
afe5f4bc8f9c [Issue 1595] Multiple typedefs of Exception should be treated as different types.
thomask
parents:
diff changeset
23 }catch(Cat c){
afe5f4bc8f9c [Issue 1595] Multiple typedefs of Exception should be treated as different types.
thomask
parents:
diff changeset
24 return 0;
afe5f4bc8f9c [Issue 1595] Multiple typedefs of Exception should be treated as different types.
thomask
parents:
diff changeset
25 }catch(Base b){
afe5f4bc8f9c [Issue 1595] Multiple typedefs of Exception should be treated as different types.
thomask
parents:
diff changeset
26 assert(0);
afe5f4bc8f9c [Issue 1595] Multiple typedefs of Exception should be treated as different types.
thomask
parents:
diff changeset
27 }
afe5f4bc8f9c [Issue 1595] Multiple typedefs of Exception should be treated as different types.
thomask
parents:
diff changeset
28 assert(0);
afe5f4bc8f9c [Issue 1595] Multiple typedefs of Exception should be treated as different types.
thomask
parents:
diff changeset
29 }
afe5f4bc8f9c [Issue 1595] Multiple typedefs of Exception should be treated as different types.
thomask
parents:
diff changeset
30