Mercurial > projects > dstress
changeset 1501:4819809e4b82
[Issue 1154] Implicit template return value + mixin results in invalid type deduction
<onlystupidspamhere@yahoo.se>
2007-04-16
http://d.puremagic.com/issues/show_bug.cgi?id=1154
author | thomask |
---|---|
date | Mon, 23 Apr 2007 17:58:46 +0000 |
parents | 8ef71fc36ff7 |
children | 898e31994aae |
files | compile/m/mixin_32_A.d compile/m/mixin_32_B.d |
diffstat | 2 files changed, 36 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/compile/m/mixin_32_A.d Mon Apr 23 17:58:46 2007 +0000 @@ -0,0 +1,18 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ <onlystupidspamhere@yahoo.se> +// @date@ 2007-04-16 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1154 +// @desc@ [Issue 1154] Implicit template return value + mixin results in invalid type deduction + +module dstress.compile.m.mixin_32_A; + +template foo() { + alias int foo; +} + +foo!() bar; + +static assert(is(typeof(bar) == int));
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/compile/m/mixin_32_B.d Mon Apr 23 17:58:46 2007 +0000 @@ -0,0 +1,18 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ <onlystupidspamhere@yahoo.se> +// @date@ 2007-04-16 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1154 +// @desc@ [Issue 1154] Implicit template return value + mixin results in invalid type deduction + +module dstress.compile.m.mixin_32_B; + +template foo() { + mixin("alias int foo;"); +} + +foo!() bar; + +static assert(is(typeof(bar) == int));