Commit 1b2ba833 authored by Daniel Honsel's avatar Daniel Honsel
Browse files

recognize variable name clashes in groups

parent 7fc10d62
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ import org.eclipse.emf.ecore.EStructuralFeature
import org.eclipse.xtext.validation.Check

import static extension de.ugoe.cs.swe.common.TTCN3ScopeHelper.*
import de.ugoe.cs.swe.tTCN3.GroupDef

class TTCN3Validator extends AbstractTTCN3Validator {

@@ -177,10 +178,13 @@ class TTCN3Validator extends AbstractTTCN3Validator {
					error('Name clash with another variable definition in this scope!', feature);
					return;
				}
			} else if (parent instanceof GroupDef) {
				if (parent.list.checkNameClashModuleDefinitionsList(variable)) {
					error('Name clash with another variable definition in this scope!', feature);
					return;
				}
			}						
			
			
			// TODO: other references in scope
			parent = parent.eContainer
		}
	}