Mercurial > projects > dstress
changeset 1477:cfcb3568d70f
[Issue 1099] weird tupleof behavior in mixins
Tomasz Stachowiak <h3r3tic@mat.uni.torun.pl>
2007-04-05
http://d.puremagic.com/issues/show_bug.cgi?id=1099
author | thomask |
---|---|
date | Fri, 06 Apr 2007 09:15:30 +0000 |
parents | 273e457eb77d |
children | 6c060ae4f8b5 |
files | nocompile/t/tupelof_01_A.d |
diffstat | 1 files changed, 24 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/t/tupelof_01_A.d Fri Apr 06 09:15:30 2007 +0000 @@ -0,0 +1,24 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Tomasz Stachowiak <h3r3tic@mat.uni.torun.pl> +// @date@ 2007-04-05 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1099 +// @desc@ [Issue 1099] weird tupleof behavior in mixins + +module dstress.nocompile.t.tupleof_01_A; + +template Mix(int a) { + alias typeof(*this) ThisType; + static assert (ThisType.init.tupleof.length == a); +} + + +struct Foo { + mixin Mix!(0); + int foo; + mixin Mix!(1); + int bar; + mixin Mix!(2); +}