# HG changeset patch # User thomask # Date 1177351314 0 # Node ID 805b24f2e33fbe1af48335c68f9dda8250cc117a # Parent 276623518fb11fe317d7b990ec60014cf2a071db [Issue 1146] mixin + assert() crashes compiler 2007-04-14 http://d.puremagic.com/issues/show_bug.cgi?id=1146 diff -r 276623518fb1 -r 805b24f2e33f nocompile/m/mixin_33_A.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/m/mixin_33_A.d Mon Apr 23 18:01:54 2007 +0000 @@ -0,0 +1,21 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ +// @date@ 2007-04-14 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1146 +// @desc@ [Issue 1146] mixin + assert() crashes compiler + +// __DSTRESS_ELINE__ 19 + +module dstress.nocompile.m.mixin_33_A; + +template MetaString(String){ + alias String Value; +} + +void foo(){ + alias MetaString!("2 == 1") S; + assert(mixin(S.Value)); +} diff -r 276623518fb1 -r 805b24f2e33f nocompile/m/mixin_33_B.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/m/mixin_33_B.d Mon Apr 23 18:01:54 2007 +0000 @@ -0,0 +1,20 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ +// @date@ 2007-04-14 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1146 +// @desc@ [Issue 1146] mixin + assert() crashes compiler + +// __DSTRESS_ELINE__ 19 + +module dstress.nocompile.m.mixin_33_B; + +template MetaString(String){ + alias String Value; +} + +void foo(){ + alias MetaString!("2 == 1") S; +} diff -r 276623518fb1 -r 805b24f2e33f nocompile/m/mixin_33_C.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/m/mixin_33_C.d Mon Apr 23 18:01:54 2007 +0000 @@ -0,0 +1,20 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ +// @date@ 2007-04-14 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1146 +// @desc@ [Issue 1146] mixin + assert() crashes compiler + +// __DSTRESS_ELINE__ 19 + +module dstress.nocompile.m.mixin_33_D; + +template MetaString(String){ + alias String Value; +} + +void foo(){ + assert(mixin(MetaString!("2 == 1").Value)); +}