changeset 1407:f1c494dc588a

[Issue 980] If a function tries to concatenate a char to a empty array, dmd complains that the function can't be evaluated at compile time John S. Skogtvedt <teleledningsanka@gmail.com> 2007-02-18 http://d.puremagic.com/issues/show_bug.cgi?id=980
author thomask
date Thu, 08 Mar 2007 16:29:23 +0000
parents 45dbf7a80237
children a4faf88df937
files compile/o/opCatAssign_22_A.d compile/o/opCatAssign_22_B.d compile/o/opCat_26_A.d compile/o/opCat_26_B.d reporter.txt
diffstat 5 files changed, 73 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/compile/o/opCatAssign_22_A.d	Thu Mar 08 16:29:23 2007 +0000
@@ -0,0 +1,18 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	John S. Skogtvedt <teleledningsanka@gmail.com>
+// @date@	2007-02-18
+// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=980
+// @desc@	[Issue 980] If a function tries to concatenate a char to a empty array, dmd complains that the function can't be evaluated at compile time
+
+module dstress.compile.o.opCatAssign_22_A;
+
+char[] test(){
+	char[] s = "";
+	return s ~= "o";
+}
+
+const x = test();
+static assert(x == "o");
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/compile/o/opCatAssign_22_B.d	Thu Mar 08 16:29:23 2007 +0000
@@ -0,0 +1,18 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	John S. Skogtvedt <teleledningsanka@gmail.com>
+// @date@	2007-02-18
+// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=980
+// @desc@	[Issue 980] If a function tries to concatenate a char to a empty array, dmd complains that the function can't be evaluated at compile time
+
+module dstress.compile.o.opCatAssign_22_B;
+
+char[] test(){
+	char[] s = "a";
+	return s ~= "o";
+}
+
+const x = test();
+static assert(x == "ao");
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/compile/o/opCat_26_A.d	Thu Mar 08 16:29:23 2007 +0000
@@ -0,0 +1,18 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	John S. Skogtvedt <teleledningsanka@gmail.com>
+// @date@	2007-02-18
+// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=980
+// @desc@	[Issue 980] If a function tries to concatenate a char to a empty array, dmd complains that the function can't be evaluated at compile time
+
+module dstress.compile.o.opCat_26_A;
+
+char[] test(){
+	char[] s = "";
+	return s ~ "o";
+}
+
+const x = test();
+static assert(x == "o");
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/compile/o/opCat_26_B.d	Thu Mar 08 16:29:23 2007 +0000
@@ -0,0 +1,18 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	John S. Skogtvedt <teleledningsanka@gmail.com>
+// @date@	2007-02-18
+// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=980
+// @desc@	[Issue 980] If a function tries to concatenate a char to a empty array, dmd complains that the function can't be evaluated at compile time
+
+module dstress.compile.o.opCat_26_B;
+
+char[] test(){
+	char[] s = "a";
+	return s ~ "o";
+}
+
+const x = test();
+static assert(x == "ao");
--- a/reporter.txt	Thu Mar 08 16:28:36 2007 +0000
+++ b/reporter.txt	Thu Mar 08 16:29:23 2007 +0000
@@ -83,6 +83,7 @@
 John C			<johnch_atms@hotmail.com>
 John Demme		<me@teqdruid.com>
 John Reimer		<brk_6502@NO_SPA_M.yahoo.com>
+John S. Skogtvedt	<teleledningsanka@gmail.com>
 Johan Granberg		<lijat.meREM@VEgmail.com>
 k2
 Kazuhiro Inaba		<kinaba@is.s.u-tokyo.ac.jp>