Mercurial > projects > dstress
changeset 1219:5d739c1b003f
[Issue 465] New: errors when trying to use static templated methods
Tomasz Stachowiak <h3r3tic@mat.uni.torun.pl>
2006-10-27
news:bug-465-3@http.d.puremagic.com/issues/
author | thomask |
---|---|
date | Thu, 23 Nov 2006 10:44:36 +0000 |
parents | 3a9e5f96ad6f |
children | c9f4f8b632d5 |
files | run/t/template_45_A.d run/t/template_45_B.d run/t/template_45_C.d run/t/template_45_D.d run/t/template_45_E.d run/t/template_45_F.d |
diffstat | 6 files changed, 194 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/t/template_45_A.d Thu Nov 23 10:44:36 2006 +0000 @@ -0,0 +1,32 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Tomasz Stachowiak <h3r3tic@mat.uni.torun.pl> +// @date@ 2006-10-27 +// @uri@ news:bug-465-3@http.d.puremagic.com/issues/ +// @desc@ [Issue 465] New: errors when trying to use static templated methods + +module dstress.run.t.template_45_A; + +ifloat status; + +struct S { + static void func(T)(T a) { + status += a; + } +} + +int main() { + status = 1.0Fi; + + S.init.func(2.0Fi); + + if(status != 3.0Fi){ + assert(0); + } + + return 0; +} + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/t/template_45_B.d Thu Nov 23 10:44:36 2006 +0000 @@ -0,0 +1,33 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Tomasz Stachowiak <h3r3tic@mat.uni.torun.pl> +// @date@ 2006-10-27 +// @uri@ news:bug-465-3@http.d.puremagic.com/issues/ +// @desc@ [Issue 465] New: errors when trying to use static templated methods + +module dstress.run.t.template_45_B; + +ifloat status; + +struct S { + static void func(T)(T a) { + status += a; + } +} + +int main() { + status = 1.0Fi; + + S s; + s.func(2.0Fi); + + if(status != 3.0Fi){ + assert(0); + } + + return 0; +} + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/t/template_45_C.d Thu Nov 23 10:44:36 2006 +0000 @@ -0,0 +1,32 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Tomasz Stachowiak <h3r3tic@mat.uni.torun.pl> +// @date@ 2006-10-27 +// @uri@ news:bug-465-3@http.d.puremagic.com/issues/ +// @desc@ [Issue 465] New: errors when trying to use static templated methods + +module dstress.run.t.template_45_C; + +ifloat status; + +struct S { + static void func(T)(T a) { + status += a; + } +} + +int main() { + status = 1.0Fi; + + S.func(2.0Fi); + + if(status != 3.0Fi){ + assert(0); + } + + return 0; +} + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/t/template_45_D.d Thu Nov 23 10:44:36 2006 +0000 @@ -0,0 +1,33 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Tomasz Stachowiak <h3r3tic@mat.uni.torun.pl> +// @date@ 2006-10-27 +// @uri@ news:bug-465-3@http.d.puremagic.com/issues/ +// @desc@ [Issue 465] New: errors when trying to use static templated methods + +module dstress.run.t.template_45_D; + +ifloat status; + +struct S { + static void func(T)(T a) { + status += a; + } +} + +int main() { + status = 1.0Fi; + + S s; + s.func!(ifloat)(2.0Fi); + + if(status != 3.0Fi){ + assert(0); + } + + return 0; +} + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/t/template_45_E.d Thu Nov 23 10:44:36 2006 +0000 @@ -0,0 +1,32 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Tomasz Stachowiak <h3r3tic@mat.uni.torun.pl> +// @date@ 2006-10-27 +// @uri@ news:bug-465-3@http.d.puremagic.com/issues/ +// @desc@ [Issue 465] New: errors when trying to use static templated methods + +module dstress.run.t.template_45_E; + +ifloat status; + +struct S { + static void func(T)(T a) { + status += a; + } +} + +int main() { + status = 1.0Fi; + + S.func!(ifloat)(2.0Fi); + + if(status != 3.0Fi){ + assert(0); + } + + return 0; +} + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/t/template_45_F.d Thu Nov 23 10:44:36 2006 +0000 @@ -0,0 +1,32 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Tomasz Stachowiak <h3r3tic@mat.uni.torun.pl> +// @date@ 2006-10-27 +// @uri@ news:bug-465-3@http.d.puremagic.com/issues/ +// @desc@ [Issue 465] New: errors when trying to use static templated methods + +module dstress.run.t.template_45_F; + +ifloat status; + +struct S { + static void func(T)(T a) { + status += a; + } +} + +int main() { + status = 1.0Fi; + + S.init.func!(ifloat)(2.0Fi); + + if(status != 3.0Fi){ + assert(0); + } + + return 0; +} + +