changeset 349:fbce829583df

attempt to pass a literal as an argument that should be a reference Walter <walter@digitalmars.com> 2005-03-21 news:000f01c52e67$eea18880$0200a8c0@colossus
author thomask
date Tue, 22 Mar 2005 08:12:53 +0000
parents fbce9ada945b
children c487647fef87
files nocompile/bug_20041103_C.d
diffstat 1 files changed, 31 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nocompile/bug_20041103_C.d	Tue Mar 22 08:12:53 2005 +0000
@@ -0,0 +1,31 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	kinghajj <kinghajj_member@pathlink.com>
+// @date@	2004-10-03
+// @uri@	news:cm98hu$e30$1@digitaldaemon.com
+// @url@	nntp://digitalmars.com/digitalmars.D/12248
+
+// __DSTRESS_ELINE__ 28
+
+module dstress.nocompile.bug_20041103_C;
+
+char rot13_c(inout char ret){
+	if(ret > 'A'-1 && ret < 'N'){
+		ret += 13;
+	}else if(ret > 'M' && ret < 'Z'+1){
+		ret -= 13;
+	}else if(ret > 'a'-1 && ret < 'n'){
+		ret += 13;
+	}else if(ret > 'm' && ret < 'z'+1){
+		ret -= 13;
+	}
+	return ret;
+}
+
+int main(){
+	char c = rot13_c('A');
+	assert(c=='A'+13);
+	return 0;
+}