Mercurial > projects > dstress
changeset 918:d3f836c7c9e6
<oskar.linde@gmail.com>
2006-03-16
news:bug-54-3@http.d.puremagic.com/bugzilla/
author | thomask |
---|---|
date | Sun, 19 Mar 2006 07:38:32 +0000 |
parents | ab71ca67c717 |
children | 4ed1f9f14948 |
files | run/t/typeof_09_A.d run/t/typeof_09_B.d run/t/typeof_09_C.d run/t/typeof_09_D.d run/t/typeof_09_E.d run/t/typeof_09_F.d run/t/typeof_09_G.d run/t/typeof_09_H.d |
diffstat | 8 files changed, 216 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/t/typeof_09_A.d Sun Mar 19 07:38:32 2006 +0000 @@ -0,0 +1,29 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ <oskar.linde@gmail.com> +// @date@ 2006-03-16 +// @uri@ news:bug-54-3@http.d.puremagic.com/bugzilla/ + +module dstress.run.t.typeof_09_A; + +typedef int MyInt = 4; + +template declare(X){ + X declare; +} + +typeof(declare!(MyInt[1]).ptr[0]) y; + +int main(){ + static if(!is(typeof(y) == MyInt)){ + static assert(0); + } + + if(y != cast(MyInt)4){ + assert(0); + } + + return 0; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/t/typeof_09_B.d Sun Mar 19 07:38:32 2006 +0000 @@ -0,0 +1,29 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ <oskar.linde@gmail.com> +// @date@ 2006-03-16 +// @uri@ news:bug-54-3@http.d.puremagic.com/bugzilla/ + +module dstress.run.t.typeof_09_B; + +typedef int MyInt = 4; + +template declare(X){ + X declare; +} + +typeof(declare!(MyInt[1])[0]) y; + +int main(){ + static if(!is(typeof(y) == MyInt)){ + static assert(0); + } + + if(y != cast(MyInt)4){ + assert(0); + } + + return 0; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/t/typeof_09_C.d Sun Mar 19 07:38:32 2006 +0000 @@ -0,0 +1,29 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ <oskar.linde@gmail.com> +// @date@ 2006-03-16 +// @uri@ news:bug-54-3@http.d.puremagic.com/bugzilla/ + +module dstress.run.t.typeof_09_C; + +typedef int MyInt = 4; + +template declare(X){ + X declare; +} + +typeof(declare!(MyInt[0])[0]) y; + +int main(){ + static if(!is(typeof(y) == MyInt)){ + static assert(0); + } + + if(y != cast(MyInt)4){ + assert(0); + } + + return 0; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/t/typeof_09_D.d Sun Mar 19 07:38:32 2006 +0000 @@ -0,0 +1,29 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ <oskar.linde@gmail.com> +// @date@ 2006-03-16 +// @uri@ news:bug-54-3@http.d.puremagic.com/bugzilla/ + +module dstress.run.t.typeof_09_D; + +typedef int MyInt = 4; + +template declare(X){ + X declare; +} + +typeof(declare!(MyInt[0]).ptr[0]) y; + +int main(){ + static if(!is(typeof(y) == MyInt)){ + static assert(0); + } + + if(y != cast(MyInt)4){ + assert(0); + } + + return 0; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/t/typeof_09_E.d Sun Mar 19 07:38:32 2006 +0000 @@ -0,0 +1,25 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ <oskar.linde@gmail.com> +// @date@ 2006-03-16 +// @uri@ news:bug-54-3@http.d.puremagic.com/bugzilla/ + +module dstress.run.t.typeof_09_E; + +typedef int MyInt = 4; + +typeof((new MyInt[1]).ptr[0]) y; + +int main(){ + static if(!is(typeof(y) == MyInt)){ + static assert(0); + } + + if(y != cast(MyInt)4){ + assert(0); + } + + return 0; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/t/typeof_09_F.d Sun Mar 19 07:38:32 2006 +0000 @@ -0,0 +1,25 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ <oskar.linde@gmail.com> +// @date@ 2006-03-16 +// @uri@ news:bug-54-3@http.d.puremagic.com/bugzilla/ + +module dstress.run.t.typeof_09_F; + +typedef int MyInt = 4; + +typeof((new MyInt[0]).ptr[0]) y; + +int main(){ + static if(!is(typeof(y) == MyInt)){ + static assert(0); + } + + if(y != cast(MyInt)4){ + assert(0); + } + + return 0; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/t/typeof_09_G.d Sun Mar 19 07:38:32 2006 +0000 @@ -0,0 +1,25 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ <oskar.linde@gmail.com> +// @date@ 2006-03-16 +// @uri@ news:bug-54-3@http.d.puremagic.com/bugzilla/ + +module dstress.run.t.typeof_09_G; + +typedef int MyInt = 4; + +typeof((new MyInt[0])[0]) y; + +int main(){ + static if(!is(typeof(y) == MyInt)){ + static assert(0); + } + + if(y != cast(MyInt)4){ + assert(0); + } + + return 0; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/t/typeof_09_H.d Sun Mar 19 07:38:32 2006 +0000 @@ -0,0 +1,25 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ <oskar.linde@gmail.com> +// @date@ 2006-03-16 +// @uri@ news:bug-54-3@http.d.puremagic.com/bugzilla/ + +module dstress.run.t.typeof_09_H; + +typedef int MyInt = 4; + +typeof((new MyInt[1])[0]) y; + +int main(){ + static if(!is(typeof(y) == MyInt)){ + static assert(0); + } + + if(y != cast(MyInt)4){ + assert(0); + } + + return 0; +}