Mercurial > projects > dstress
changeset 1229:01942d3423b2
[Issue 532] New: Wrong name mangling for template alias params of local vars
Don Clugston <clugdbug@yahoo.com.au>
2006-11-16
news:bug-532-3@http.d.puremagic.com/issues/
author | thomask |
---|---|
date | Sat, 25 Nov 2006 13:37:24 +0000 |
parents | 7020fe16bf5e |
children | a3b2e2daf68e |
files | compile/m/mangleof_19_A.d compile/m/mangleof_19_B.d compile/m/mangleof_19_C.d compile/m/mangleof_19_D.d compile/m/mangleof_19_E.d compile/m/mangleof_19_F.d compile/m/mangleof_19_G.d |
diffstat | 7 files changed, 214 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/compile/m/mangleof_19_A.d Sat Nov 25 13:37:24 2006 +0000 @@ -0,0 +1,31 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Don Clugston <clugdbug@yahoo.com.au> +// @date@ 2006-11-16 +// @uri@ news:bug-532-3@http.d.puremagic.com/issues/ +// @desc@ [Issue 532] New: Wrong name mangling for template alias params of local vars + +module dstress.compile.m.mangleof_19_A; + +template Apple(alias F){ + class Basket { + } + + alias void function (Basket) H; + + const char [] mangledname = typeof(H).mangleof; +} + +template Peach(alias A){ + const char [] root = Apple!(A).mangledname; + static assert(Apple!(A).mangledname == root); +} + +int main(){ + int tree; + const char[] s = Peach!(tree).root; + + return 0; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/compile/m/mangleof_19_B.d Sat Nov 25 13:37:24 2006 +0000 @@ -0,0 +1,31 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Don Clugston <clugdbug@yahoo.com.au> +// @date@ 2006-11-16 +// @uri@ news:bug-532-3@http.d.puremagic.com/issues/ +// @desc@ [Issue 532] New: Wrong name mangling for template alias params of local vars + +module dstress.compile.m.mangleof_19_B; + +template Apple(alias F){ + struct Basket { + } + + alias void function (Basket) H; + + const char [] mangledname = typeof(H).mangleof; +} + +template Peach(alias A){ + const char [] root = Apple!(A).mangledname; + static assert(Apple!(A).mangledname == root); +} + +int main(){ + int tree; + const char[] s = Peach!(tree).root; + + return 0; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/compile/m/mangleof_19_C.d Sat Nov 25 13:37:24 2006 +0000 @@ -0,0 +1,31 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Don Clugston <clugdbug@yahoo.com.au> +// @date@ 2006-11-16 +// @uri@ news:bug-532-3@http.d.puremagic.com/issues/ +// @desc@ [Issue 532] New: Wrong name mangling for template alias params of local vars + +module dstress.compile.m.mangleof_19_C; + +template Apple(alias F){ + enum Basket { + } + + alias void function (Basket) H; + + const char [] mangledname = typeof(H).mangleof; +} + +template Peach(alias A){ + const char [] root = Apple!(A).mangledname; + static assert(Apple!(A).mangledname == root); +} + +int main(){ + int tree; + const char[] s = Peach!(tree).root; + + return 0; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/compile/m/mangleof_19_D.d Sat Nov 25 13:37:24 2006 +0000 @@ -0,0 +1,31 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Don Clugston <clugdbug@yahoo.com.au> +// @date@ 2006-11-16 +// @uri@ news:bug-532-3@http.d.puremagic.com/issues/ +// @desc@ [Issue 532] New: Wrong name mangling for template alias params of local vars + +module dstress.compile.m.mangleof_19_D; + +template Apple(alias F){ + union Basket { + } + + alias void function (Basket) H; + + const char [] mangledname = typeof(H).mangleof; +} + +template Peach(alias A){ + const char [] root = Apple!(A).mangledname; + static assert(Apple!(A).mangledname == root); +} + +int main(){ + int tree; + const char[] s = Peach!(tree).root; + + return 0; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/compile/m/mangleof_19_E.d Sat Nov 25 13:37:24 2006 +0000 @@ -0,0 +1,30 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Don Clugston <clugdbug@yahoo.com.au> +// @date@ 2006-11-16 +// @uri@ news:bug-532-3@http.d.puremagic.com/issues/ +// @desc@ [Issue 532] New: Wrong name mangling for template alias params of local vars + +module dstress.compile.m.mangleof_19_E; + +template Apple(alias F){ + typedef int Basket; + + alias void function (Basket) H; + + const char [] mangledname = typeof(H).mangleof; +} + +template Peach(alias A){ + const char [] root = Apple!(A).mangledname; + static assert(Apple!(A).mangledname == root); +} + +int main(){ + int tree; + const char[] s = Peach!(tree).root; + + return 0; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/compile/m/mangleof_19_F.d Sat Nov 25 13:37:24 2006 +0000 @@ -0,0 +1,30 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Don Clugston <clugdbug@yahoo.com.au> +// @date@ 2006-11-16 +// @uri@ news:bug-532-3@http.d.puremagic.com/issues/ +// @desc@ [Issue 532] New: Wrong name mangling for template alias params of local vars + +module dstress.compile.m.mangleof_19_F; + +template Apple(alias F){ + alias int Basket; + + alias void function (Basket) H; + + const char [] mangledname = typeof(H).mangleof; +} + +template Peach(alias A){ + const char [] root = Apple!(A).mangledname; + static assert(Apple!(A).mangledname == root); +} + +int main(){ + int tree; + const char[] s = Peach!(tree).root; + + return 0; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/compile/m/mangleof_19_G.d Sat Nov 25 13:37:24 2006 +0000 @@ -0,0 +1,30 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Don Clugston <clugdbug@yahoo.com.au> +// @date@ 2006-11-16 +// @uri@ news:bug-532-3@http.d.puremagic.com/issues/ +// @desc@ [Issue 532] New: Wrong name mangling for template alias params of local vars + +module dstress.compile.m.mangleof_19_G; + +template Apple(alias F){ + alias int[] Basket; + + alias void function (Basket) H; + + const char [] mangledname = typeof(H).mangleof; +} + +template Peach(alias A){ + const char [] root = Apple!(A).mangledname; + static assert(Apple!(A).mangledname == root); +} + +int main(){ + int tree; + const char[] s = Peach!(tree).root; + + return 0; +}