Loading de.ugoe.cs.swe.TTCN3/src/de/ugoe/cs/swe/validation/TTCN3Validator.xtend +5 −11 Original line number Diff line number Diff line Loading @@ -75,17 +75,11 @@ class TTCN3Validator extends AbstractTTCN3Validator { // find name clashes with module variables val container = field.findDesiredParent(typeof(ModuleDefinitionsList)) as ModuleDefinitionsList val defs = container.definitions.filter[it.def instanceof ConstDef] // TODO: || it.def instanceof ModuleParDef for (EObject v : defs) { val constDefList = ((v as ModuleDefinition).def as ConstDef).defs as ConstList for (SingleConstDef d : constDefList.list) { if (field.name.equals(d.name)) { if (container.checkNameClashModuleDefinitionsList(field, field.name)) { error('Name clash with another variable definition in this scope!', TTCN3Package.eINSTANCE.structFieldDef_Name); return; } } } // find name clashes with variables in parent body val body = field.findDesiredParent(typeof(StructDefBody)) as StructDefBody Loading Loading
de.ugoe.cs.swe.TTCN3/src/de/ugoe/cs/swe/validation/TTCN3Validator.xtend +5 −11 Original line number Diff line number Diff line Loading @@ -75,17 +75,11 @@ class TTCN3Validator extends AbstractTTCN3Validator { // find name clashes with module variables val container = field.findDesiredParent(typeof(ModuleDefinitionsList)) as ModuleDefinitionsList val defs = container.definitions.filter[it.def instanceof ConstDef] // TODO: || it.def instanceof ModuleParDef for (EObject v : defs) { val constDefList = ((v as ModuleDefinition).def as ConstDef).defs as ConstList for (SingleConstDef d : constDefList.list) { if (field.name.equals(d.name)) { if (container.checkNameClashModuleDefinitionsList(field, field.name)) { error('Name clash with another variable definition in this scope!', TTCN3Package.eINSTANCE.structFieldDef_Name); return; } } } // find name clashes with variables in parent body val body = field.findDesiredParent(typeof(StructDefBody)) as StructDefBody Loading