Mercurial > projects > dstress
changeset 1367:24d5585f4fc0
[Issue 975] compile-time const array makes dmd crash
Daniel <Daniel919@web.de>
2007-02-17
http://d.puremagic.com/issues/show_bug.cgi?id=975
author | thomask |
---|---|
date | Mon, 26 Feb 2007 11:33:37 +0000 |
parents | cb2353467b1c |
children | 2203e9c5850e |
files | run/t/tuple_17_A.d |
diffstat | 1 files changed, 23 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/t/tuple_17_A.d Mon Feb 26 11:33:37 2007 +0000 @@ -0,0 +1,23 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Daniel <Daniel919@web.de> +// @date@ 2007-02-17 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=975 +// @desc@ [Issue 975] compile-time const array makes dmd crash + +module dstress.run.t.tuple_17_A; + +template eval(A...) { + alias A eval; +} + +const int foo[5] = [0,1,2,3,4]; + +int main(){ + if(2 != eval!(foo[3])){ + assert(0); + } + return 0; +}