Commit d497f62e authored by Philip Makedonski's avatar Philip Makedonski
Browse files

+ignore assignments when checking for unused local definitions (#77)

parent e5bedcde
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -14,7 +14,9 @@ import org.eclipse.xtend.typesystem.emf.EcoreUtil2;

import com.google.common.collect.Lists;

import de.ugoe.cs.swe.tTCN3.Assignment;
import de.ugoe.cs.swe.tTCN3.Enumeration;
import de.ugoe.cs.swe.tTCN3.Head;
public class TTCN3ReferenceHelper {

	/**
@@ -136,6 +138,14 @@ public class TTCN3ReferenceHelper {
							if (refElement instanceof Enumeration) {
								return false;
							}
							//handle use within assignments
							if (rootElement instanceof Head &&
									rootElement
										.eContainer()
										.eContainer()
										.eContainer() instanceof Assignment) {
								return false;
							}
							return true;
						}
					}