Mercurial > projects > dstress
changeset 1506:b3b959a6ff7b
[Issue 1144] template mixin causes DMD crash
Alex <CppCoder@gmail.com>
2007-04-14
http://d.puremagic.com/issues/show_bug.cgi?id=1144
author | thomask |
---|---|
date | Mon, 23 Apr 2007 18:04:38 +0000 |
parents | b0e88ac8bc7e |
children | 2846120b9538 |
files | nocompile/m/mixin_34_A.d |
diffstat | 1 files changed, 26 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/m/mixin_34_A.d Mon Apr 23 18:04:38 2007 +0000 @@ -0,0 +1,26 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Alex <CppCoder@gmail.com> +// @date@ 2007-04-14 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1144 +// @desc@ [Issue 1144] template mixin causes DMD crash + +// __DSTRESS_ELINE__ 16 + +module dstress.nocompile.m.mixin_34_A; + +char[] testHelper(A ...)(){ + char[] result; + foreach(t; a){ + result ~= "int " ~ t ~ ";\n"; + } + return result; +} + +int main(){ + mixin( testHelper!( "hello", "world" )() ); + return 0; +} +