changeset 1422:26bcea00b742

[Issue 1026] dmd SEGV when checking length of Tuple elements when length == 0 Russ Lewis <webmaster@villagersonline.com> 2007-03-05 http://d.puremagic.com/issues/show_bug.cgi?id=1026
author thomask
date Sun, 11 Mar 2007 11:18:57 +0000
parents 8eb7223bbe9a
children 49ae61a333dd
files compile/t/tuple_18_F.d nocompile/t/tuple_18_G.d
diffstat 2 files changed, 45 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/compile/t/tuple_18_F.d	Sun Mar 11 11:18:57 2007 +0000
@@ -0,0 +1,23 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Russ Lewis <webmaster@villagersonline.com>
+// @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_F;
+
+template Tuple(Elements...) {
+	alias Elements Tuple;
+}
+
+struct Foo{
+}
+
+struct Bar{
+	Tuple!(Foo) elements;
+}
+
+static assert(Bar.elements.length == 1);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nocompile/t/tuple_18_G.d	Sun Mar 11 11:18:57 2007 +0000
@@ -0,0 +1,22 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Russ Lewis <webmaster@villagersonline.com>
+// @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
+
+// __DSTRESS_ELINE__ 22
+
+module dstress.nocompile.t.tuple_18_G;
+
+template Tuple(Elements...) {
+	alias Elements Tuple;
+}
+
+struct Bar{
+	Tuple!() elements;
+}
+
+static assert(Bar.elements[0]);