changeset 1361:2346dc04e49f

[Issue 981] CFTE fails in non-template and functions that takes no args. Kevin Bealer <kevinbealer@gmail.com> 2007-02-18 http://d.puremagic.com/issues/show_bug.cgi?id=981
author thomask
date Mon, 26 Feb 2007 11:28:15 +0000
parents 5cd796ed85c3
children 4a49d5a2169a
files run/b/bug_interpret_96_A.d run/b/bug_interpret_96_B.d run/b/bug_interpret_96_C.d run/b/bug_interpret_96_D.d run/b/bug_interpret_96_E.d
diffstat 5 files changed, 130 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/b/bug_interpret_96_A.d	Mon Feb 26 11:28:15 2007 +0000
@@ -0,0 +1,26 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Kevin Bealer <kevinbealer@gmail.com>
+// @date@	2007-02-18
+// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=981
+// @desc@	[Issue 981] CFTE fails in non-template and functions that takes no args.
+
+module dstress.run.b.bug_interpret_96_A;
+
+char[] foo(char[] text){
+	return "abc" ~ text;
+}
+
+struct S{
+	const char[] x = foo("d");
+}
+
+int main(){
+	S s;
+	if("abcd" != s.x){
+		assert(0);
+	}
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/b/bug_interpret_96_B.d	Mon Feb 26 11:28:15 2007 +0000
@@ -0,0 +1,26 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Kevin Bealer <kevinbealer@gmail.com>
+// @date@	2007-02-18
+// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=981
+// @desc@	[Issue 981] CFTE fails in non-template and functions that takes no args.
+
+module dstress.run.b.bug_interpret_96_B;
+
+char[] foo(char[] text){
+	return "abc" ~ text;
+}
+
+struct S(){
+	const char[] x = foo("d");
+}
+
+int main(){
+	S!() s;
+	if("abcd" != s.x){
+		assert(0);
+	}
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/b/bug_interpret_96_C.d	Mon Feb 26 11:28:15 2007 +0000
@@ -0,0 +1,26 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Kevin Bealer <kevinbealer@gmail.com>
+// @date@	2007-02-18
+// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=981
+// @desc@	[Issue 981] CFTE fails in non-template and functions that takes no args.
+
+module dstress.run.b.bug_interpret_96_C;
+
+char[] foo(){
+	return "abc";
+}
+
+struct S(){
+	const char[] x = foo();
+}
+
+int main(){
+	S!() s;
+	if("abc" != s.x){
+		assert(0);
+	}
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/b/bug_interpret_96_D.d	Mon Feb 26 11:28:15 2007 +0000
@@ -0,0 +1,26 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Kevin Bealer <kevinbealer@gmail.com>
+// @date@	2007-02-18
+// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=981
+// @desc@	[Issue 981] CFTE fails in non-template and functions that takes no args.
+
+module dstress.run.b.bug_interpret_96_D;
+
+char[] foo(){
+	return "abc";
+}
+
+struct S{
+	const char[] x = foo();
+}
+
+int main(){
+	S s;
+	if("abc" != s.x){
+		assert(0);
+	}
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/b/bug_interpret_96_E.d	Mon Feb 26 11:28:15 2007 +0000
@@ -0,0 +1,26 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Kevin Bealer <kevinbealer@gmail.com>
+// @date@	2007-02-18
+// @uri@	http://d.puremagic.com/issues/show_bug.cgi?id=981
+// @desc@	[Issue 981] CFTE fails in non-template and functions that takes no args.
+
+module dstress.run.b.bug_interpret_96_E;
+
+char[] foo(){
+	return "abc";
+}
+
+struct S(T){
+	const char[] x = foo();
+}
+
+int main(){
+	S!(int) s;
+	if("abc" != s.x){
+		assert(0);
+	}
+	return 0;
+}