changeset 285:68f8150db4a5

function as case condition Rev <Rev_member@pathlink.com> 2005-02-13 news:cunl9i$15r2$1@digitaldaemon.com nntp://news.digitalmars.com/digitalmars.D.bugs/2966
author thomask
date Sun, 13 Feb 2005 21:15:50 +0000
parents dca79be6814d
children 550d9c4854df
files nocompile/case_01.d nocompile/case_02.d
diffstat 2 files changed, 43 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nocompile/case_01.d	Sun Feb 13 21:15:50 2005 +0000
@@ -0,0 +1,22 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Rev <Rev_member@pathlink.com>
+// @date@	2005-02-13
+// @uri@	news:cunl9i$15r2$1@digitaldaemon.com
+// @url@	nntp://news.digitalmars.com/digitalmars.D.bugs/2966
+
+module dstress.nocompile.case_01;
+
+char[] getString(){
+	return "i";
+}
+
+void test(){
+	char[] hold;
+	switch(hold) {
+		case "":
+		case getString():
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nocompile/case_02.d	Sun Feb 13 21:15:50 2005 +0000
@@ -0,0 +1,21 @@
+// $HeadURL$
+// $Date$
+// $Author$
+
+// @author@	Rev <Rev_member@pathlink.com>
+// @date@	2005-02-13
+// @uri@	news:cunl9i$15r2$1@digitaldaemon.com
+// @url@	nntp://news.digitalmars.com/digitalmars.D.bugs/2966
+
+module dstress.nocompile.case_02;
+
+char[] getString(){
+	return "i";
+}
+
+void test(){
+	char[] hold;
+	switch(hold) {
+		case getString():
+	}
+}