[vala] Set error field when detecting duplicate switch label



commit c92fe597823f291f856617d860c630a0b79bf691
Author: Jürg Billeter <j bitron ch>
Date:   Mon Mar 22 10:43:48 2010 +0100

    Set error field when detecting duplicate switch label

 vala/valaswitchstatement.vala |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/vala/valaswitchstatement.vala b/vala/valaswitchstatement.vala
index 00a8b8f..976e7d4 100644
--- a/vala/valaswitchstatement.vala
+++ b/vala/valaswitchstatement.vala
@@ -131,6 +131,7 @@ public class Vala.SwitchStatement : CodeNode, Statement {
 				}
 
 				if (value != null && !labelset.add (value)) {
+					error = true;
 					Report.error (label.expression.source_reference, "Switch statement already contains this label");
 				}
 			}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]