changeset 1604:cc724d521a34

Add note about possible issues with test case depending on switch scopes.
author Christian Kamm <kamm incasoftware de>
date Sat, 28 Mar 2009 19:17:58 +0100
parents 2031b04871b3
children 392a442e2d64
files run/s/switch_22_C.d
diffstat 1 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/run/s/switch_22_C.d	Sat Mar 28 19:17:32 2009 +0100
+++ b/run/s/switch_22_C.d	Sat Mar 28 19:17:58 2009 +0100
@@ -9,6 +9,19 @@
 
 module dstress.run.s.switch_22_C;
 
+/+
+	The validity of this test case is dubious:
+	the spec is not explicit about scopes in a switch statement
+	and DMD transforms the scope(success) into:
+	
+	switch(3){
+		bool success = true;
+		try { default: }
+		catch(Object e) { success = false; throw e; }
+		finally { if(success) i--; }
+	}
++/
+
 int main(){
 	int i = 2;