# HG changeset patch # User thomask # Date 1192813670 0 # Node ID afe5f4bc8f9c098c042af85e64329edf1836ec4b # Parent 54833ea51c6fc7bafa89a1a188c0f141a0fe1da0 [Issue 1595] Multiple typedefs of Exception should be treated as different types. 2007-10-07 http://d.puremagic.com/issues/show_bug.cgi?id=1595 diff -r 54833ea51c6f -r afe5f4bc8f9c run/c/catch_08_A.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/c/catch_08_A.d Fri Oct 19 17:07:50 2007 +0000 @@ -0,0 +1,26 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ +// @date@ 2007-10-07 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1595 +// @desc@ [Issue 1595] Multiple typedefs of Exception should be treated as different types. + +module dstress.run.c.catch_08_A; + +class Base{ +} + +typedef Base Cat; +typedef Base Dog; + +int main(){ + try{ + throw new Cat(); + }catch(Cat c){ + return 0; + } + assert(0); +} + diff -r 54833ea51c6f -r afe5f4bc8f9c run/c/catch_08_B.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/c/catch_08_B.d Fri Oct 19 17:07:50 2007 +0000 @@ -0,0 +1,26 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ +// @date@ 2007-10-07 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1595 +// @desc@ [Issue 1595] Multiple typedefs of Exception should be treated as different types. + +module dstress.run.c.catch_08_B; + +class Base{ +} + +typedef Base Cat; +typedef Base Dog; + +int main(){ + try{ + throw new Cat(); + }catch(Base b){ + return 0; + } + assert(0); +} + diff -r 54833ea51c6f -r afe5f4bc8f9c run/c/catch_08_C.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/c/catch_08_C.d Fri Oct 19 17:07:50 2007 +0000 @@ -0,0 +1,28 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ +// @date@ 2007-10-07 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1595 +// @desc@ [Issue 1595] Multiple typedefs of Exception should be treated as different types. + +module dstress.run.c.catch_08_C; + +class Base{ +} + +typedef Base Cat; +typedef Base Dog; + +int main(){ + try{ + throw new Cat(); + }catch(Cat c){ + return 0; + }catch(Base b){ + assert(0); + } + assert(0); +} + diff -r 54833ea51c6f -r afe5f4bc8f9c run/c/catch_08_D.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/c/catch_08_D.d Fri Oct 19 17:07:50 2007 +0000 @@ -0,0 +1,28 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ +// @date@ 2007-10-07 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1595 +// @desc@ [Issue 1595] Multiple typedefs of Exception should be treated as different types. + +module dstress.run.c.catch_08_D; + +class Base{ +} + +typedef Base Cat; +typedef Base Dog; + +int main(){ + try{ + throw new Cat(); + }catch(Dog d){ + assert(0); + }catch(Cat c){ + return 0; + } + assert(0); +} + diff -r 54833ea51c6f -r afe5f4bc8f9c run/c/catch_08_E.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/c/catch_08_E.d Fri Oct 19 17:07:50 2007 +0000 @@ -0,0 +1,30 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ +// @date@ 2007-10-07 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1595 +// @desc@ [Issue 1595] Multiple typedefs of Exception should be treated as different types. + +module dstress.run.c.catch_08_E; + +class Base{ +} + +typedef Base Cat; +typedef Base Dog; + +int main(){ + try{ + throw new Cat(); + }catch(Dog d){ + assert(0); + }catch(Cat c){ + return 0; + }catch(Base b){ + assert(0); + } + assert(0); +} + diff -r 54833ea51c6f -r afe5f4bc8f9c run/c/catch_08_F.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/c/catch_08_F.d Fri Oct 19 17:07:50 2007 +0000 @@ -0,0 +1,30 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ +// @date@ 2007-10-07 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1595 +// @desc@ [Issue 1595] Multiple typedefs of Exception should be treated as different types. + +module dstress.run.c.catch_08_F; + +class Base{ +} + +typedef Base Cat; +typedef Base Dog; + +int main(){ + try{ + throw new Dog(); + }catch(Dog d){ + return 0; + }catch(Cat c){ + assert(0); + }catch(Base b){ + assert(0); + } + assert(0); +} + diff -r 54833ea51c6f -r afe5f4bc8f9c run/c/catch_08_G.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/c/catch_08_G.d Fri Oct 19 17:07:50 2007 +0000 @@ -0,0 +1,30 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ +// @date@ 2007-10-07 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1595 +// @desc@ [Issue 1595] Multiple typedefs of Exception should be treated as different types. + +module dstress.run.c.catch_08_G; + +class Base{ +} + +typedef Base Cat; +typedef Base Dog; + +int main(){ + try{ + throw new Base(); + }catch(Dog d){ + assert(0); + }catch(Cat c){ + assert(0); + }catch(Base b){ + return 0; + } + assert(0); +} +