Mercurial > projects > dstress
changeset 1478:6c060ae4f8b5
[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:16:03 +0000 |
parents | cfcb3568d70f |
children | ffdc1fcfe4ca |
files | nocompile/t/tupelof_01_B.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_B.d Fri Apr 06 09:16:03 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_B; + +template Mix(int a) { + alias typeof(this) ThisType; + static assert (ThisType.init.tupleof.length == a); +} + + +class Foo { + mixin Mix!(0); + int foo; + mixin Mix!(1); + int bar; + mixin Mix!(2); +}