changeset 1297:c6b68d917f83

[Issue 654] Const string member using implicit type inference gives garbage in certain situation Christopher Pellng <chris@inventivedingo.com> 2006-12-05 http://d.puremagic.com/issues/show_bug.cgi?id=654
author thomask
date Sat, 30 Dec 2006 15:40:25 +0000
parents 630c47fdf443
children da2ca77aec83
files run/o/odd_bug_11_A.d run/o/odd_bug_11_B.d run/o/odd_bug_11_C.d run/o/odd_bug_11_D.d run/o/odd_bug_11_E.d
diffstat 5 files changed, 154 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/o/odd_bug_11_A.d	Sat Dec 30 15:40:25 2006 +0000
@@ -0,0 +1,32 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Christopher Pellng <chris@inventivedingo.com>
+// @date@	2006-12-05
+// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=654
+// @desc@	[Issue 654] Const string member using implicit type inference gives garbage in certain situation
+
+module dstress.run.o.odd_bug_11_A;
+
+class A {
+	static const MY_CONST_STRING = "hello";
+
+	this(char[] cmp) {
+		if(cmp != MY_CONST_STRING){
+			assert(0);
+		}
+	}
+}
+
+void dummy(...){}
+
+void never_called() {
+	dummy("%s", A.MY_CONST_STRING);
+}
+
+int main() {
+	A a = new A("hello");
+
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/o/odd_bug_11_B.d	Sat Dec 30 15:40:25 2006 +0000
@@ -0,0 +1,32 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Christopher Pellng <chris@inventivedingo.com>
+// @date@	2006-12-05
+// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=654
+// @desc@	[Issue 654] Const string member using implicit type inference gives garbage in certain situation
+
+module dstress.run.o.odd_bug_11_B;
+
+class A {
+	const MY_CONST_STRING = "hello";
+
+	this(char[] cmp) {
+		if(cmp != MY_CONST_STRING){
+			assert(0);
+		}
+	}
+}
+
+void dummy(...){}
+
+void never_called() {
+	dummy("%s", A.MY_CONST_STRING);
+}
+
+int main() {
+	A a = new A("hello");
+
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/o/odd_bug_11_C.d	Sat Dec 30 15:40:25 2006 +0000
@@ -0,0 +1,32 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Christopher Pellng <chris@inventivedingo.com>
+// @date@	2006-12-05
+// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=654
+// @desc@	[Issue 654] Const string member using implicit type inference gives garbage in certain situation
+
+module dstress.run.o.odd_bug_11_C;
+
+class A {
+	static MY_CONST_STRING = "hello";
+
+	this(char[] cmp) {
+		if(cmp != MY_CONST_STRING){
+			assert(0);
+		}
+	}
+}
+
+void dummy(...){}
+
+void never_called() {
+	dummy("%s", A.MY_CONST_STRING);
+}
+
+int main() {
+	A a = new A("hello");
+
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/o/odd_bug_11_D.d	Sat Dec 30 15:40:25 2006 +0000
@@ -0,0 +1,32 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Christopher Pellng <chris@inventivedingo.com>
+// @date@	2006-12-05
+// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=654
+// @desc@	[Issue 654] Const string member using implicit type inference gives garbage in certain situation
+
+module dstress.run.o.odd_bug_11_D;
+
+class A {
+	static const char[] MY_CONST_STRING = "hello";
+
+	this(char[] cmp) {
+		if(cmp != MY_CONST_STRING){
+			assert(0);
+		}
+	}
+}
+
+void dummy(...){}
+
+void never_called() {
+	dummy("%s", A.MY_CONST_STRING);
+}
+
+int main() {
+	A a = new A("hello");
+
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/o/odd_bug_11_E.d	Sat Dec 30 15:40:25 2006 +0000
@@ -0,0 +1,26 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Christopher Pellng <chris@inventivedingo.com>
+// @date@	2006-12-05
+// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=654
+// @desc@	[Issue 654] Const string member using implicit type inference gives garbage in certain situation
+
+module dstress.run.o.odd_bug_11_E;
+
+class A {
+	static const MY_CONST_STRING = "hello";
+
+	this(char[] cmp) {
+		if(cmp != MY_CONST_STRING){
+			assert(0);
+		}
+	}
+}
+
+int main() {
+	A a = new A("hello");
+
+	return 0;
+}