Mercurial > projects > dstress
diff compile/m/mangleof_19_A.d @ 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 | |
children | daef239f37cf |
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; +}