# HG changeset patch # User thomask # Date 1177351126 0 # Node ID 4819809e4b82f8c624e08eada8ea73da80b425d1 # Parent 8ef71fc36ff73e2dfb6c9c33a8a8049d65b1b17a [Issue 1154] Implicit template return value + mixin results in invalid type deduction 2007-04-16 http://d.puremagic.com/issues/show_bug.cgi?id=1154 diff -r 8ef71fc36ff7 -r 4819809e4b82 compile/m/mixin_32_A.d --- /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@ +// @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)); diff -r 8ef71fc36ff7 -r 4819809e4b82 compile/m/mixin_32_B.d --- /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@ +// @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));