# HG changeset patch # User thomask # Date 1173611905 0 # Node ID 8eb7223bbe9a645918fbb91f8a33db2c78139c92 # Parent eb761d8edcca459c56eb57ac926b3697faaf776c [Issue 1026] dmd SEGV when checking length of Tuple elements when length == 0 Russ Lewis 2007-03-05 http://d.puremagic.com/issues/show_bug.cgi?id=1026 diff -r eb761d8edcca -r 8eb7223bbe9a compile/t/tuple_18_A.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/compile/t/tuple_18_A.d Sun Mar 11 11:18:25 2007 +0000 @@ -0,0 +1,20 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Russ Lewis +// @date@ 2007-03-05 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1026 +// @desc@ [Issue 1026] dmd SEGV when checking length of Tuple elements when length == 0 + +module dstress.compile.t.tuple_18_A; + +template Tuple(Elements...) { + alias Elements Tuple; +} + +struct foo { + Tuple!() elements; +} + +static assert(foo.elements.length == 0); diff -r eb761d8edcca -r 8eb7223bbe9a compile/t/tuple_18_B.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/compile/t/tuple_18_B.d Sun Mar 11 11:18:25 2007 +0000 @@ -0,0 +1,20 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Russ Lewis +// @date@ 2007-03-05 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1026 +// @desc@ [Issue 1026] dmd SEGV when checking length of Tuple elements when length == 0 + +module dstress.compile.t.tuple_18_B; + +template Tuple(Elements...) { + alias Elements Tuple; +} + +struct foo { + Tuple!(int) elements; +} + +static assert(foo.elements.length == 1); diff -r eb761d8edcca -r 8eb7223bbe9a compile/t/tuple_18_C.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/compile/t/tuple_18_C.d Sun Mar 11 11:18:25 2007 +0000 @@ -0,0 +1,20 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Russ Lewis +// @date@ 2007-03-05 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1026 +// @desc@ [Issue 1026] dmd SEGV when checking length of Tuple elements when length == 0 + +module dstress.compile.t.tuple_18_C; + +template Tuple(Elements...) { + alias Elements Tuple; +} + +union foo { + Tuple!(int) elements; +} + +static assert(foo.elements.length == 1); diff -r eb761d8edcca -r 8eb7223bbe9a compile/t/tuple_18_D.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/compile/t/tuple_18_D.d Sun Mar 11 11:18:25 2007 +0000 @@ -0,0 +1,20 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Russ Lewis +// @date@ 2007-03-05 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1026 +// @desc@ [Issue 1026] dmd SEGV when checking length of Tuple elements when length == 0 + +module dstress.compile.t.tuple_18_D; + +template Tuple(Elements...) { + alias Elements Tuple; +} + +union foo { + Tuple!() elements; +} + +static assert(foo.elements.length == 0); diff -r eb761d8edcca -r 8eb7223bbe9a compile/t/tuple_18_E.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/compile/t/tuple_18_E.d Sun Mar 11 11:18:25 2007 +0000 @@ -0,0 +1,18 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Russ Lewis +// @date@ 2007-03-05 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1026 +// @desc@ [Issue 1026] dmd SEGV when checking length of Tuple elements when length == 0 + +module dstress.compile.t.tuple_18_E; + +template Tuple(Elements...) { + alias Elements Tuple; +} + +Tuple!() elements; + +static assert(elements.length == 0);