changeset 1246:eb667a69ce7a

[Issue 617] New: IFTI doesn't use normal promotion rules for non-template parameters Bill Baxter <wbaxter@gmail.com> 2006-11-28 news:bug-617-3@http.d.puremagic.com/issues/
author thomask
date Wed, 29 Nov 2006 21:20:07 +0000
parents bcb1327a0f5d
children d75d907a68bb
files run/t/template_49_A.d run/t/template_49_B.d run/t/template_49_C.d
diffstat 3 files changed, 69 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/t/template_49_A.d	Wed Nov 29 21:20:07 2006 +0000
@@ -0,0 +1,23 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Bill Baxter <wbaxter@gmail.com>
+// @date@	2006-11-28
+// @uri@	news:bug-617-3@http.d.puremagic.com/issues/
+// @desc@	[Issue 617] New: IFTI doesn't use normal promotion rules for non-template parameters
+
+module dstress.run.t.template_49_A;
+
+template foo(T){
+	size_t foo(T s, uint i){
+		return s.length + i;
+	}
+}
+
+int main(){
+	if(foo("ab", 5) != 7){
+		assert(0);
+	}
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/t/template_49_B.d	Wed Nov 29 21:20:07 2006 +0000
@@ -0,0 +1,23 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Bill Baxter <wbaxter@gmail.com>
+// @date@	2006-11-28
+// @uri@	news:bug-617-3@http.d.puremagic.com/issues/
+// @desc@	[Issue 617] New: IFTI doesn't use normal promotion rules for non-template parameters
+
+module dstress.run.t.template_49_B;
+
+template foo(T){
+	size_t foo(T s, int i){
+		return s.length + i;
+	}
+}
+
+int main(){
+	if(foo("ab", 5) != 7){
+		assert(0);
+	}
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run/t/template_49_C.d	Wed Nov 29 21:20:07 2006 +0000
@@ -0,0 +1,23 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Bill Baxter <wbaxter@gmail.com>
+// @date@	2006-11-28
+// @uri@	news:bug-617-3@http.d.puremagic.com/issues/
+// @desc@	[Issue 617] New: IFTI doesn't use normal promotion rules for non-template parameters
+
+module dstress.run.t.template_49_C;
+
+template foo(T){
+	size_t foo(T s, uint i){
+		return s.length + i;
+	}
+}
+
+int main(){
+	if(foo!(char[])("ab", 5) != 7){
+		assert(0);
+	}
+	return 0;
+}