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

+fixed #56 - superfluous warnings for over specific runs on clauses

parent 9c015b46
Loading
Loading
Loading
Loading
+9 −10
Original line number Diff line number Diff line
@@ -986,7 +986,6 @@ class CodeStyleValidator extends AbstractDeclarativeValidator {

	private def boolean isReferencedInHierarchy(TTCN3Reference parent, ArrayList<TTCN3Reference> consideredAltOrFunc) {
		var ArrayList<TTCN3Reference> nextLevelCheck = parent.nextLevelFunctionsOrAltsteps(consideredAltOrFunc)

		do {
			for (o : nextLevelCheck) {
				if (o instanceof FunctionDef) {
@@ -1000,9 +999,10 @@ class CodeStyleValidator extends AbstractDeclarativeValidator {
						}
					} else {
						// TODO: error message?
						if (nextLevelCheck.last.equals(o)) {
							nextLevelCheck = null;
						}
						var ArrayList<TTCN3Reference> nlc = new ArrayList<TTCN3Reference>()
						nlc.addAll(nextLevelCheck)
						nlc.remove(o)
						nextLevelCheck = nlc
					}
				} else if (o instanceof AltstepDef) {
					if (o.spec != null) {
@@ -1015,14 +1015,13 @@ class CodeStyleValidator extends AbstractDeclarativeValidator {
						}
					} else {
						// TODO: error message?
						if (nextLevelCheck.last.equals(o)) {
							nextLevelCheck = null;
						}
						var ArrayList<TTCN3Reference> nlc = new ArrayList<TTCN3Reference>()
						nlc.addAll(nextLevelCheck)
						nlc.remove(o)
						nextLevelCheck = nlc
					}
				} else if (o.eIsProxy) {
					if (nextLevelCheck.last.equals(o)) {
						nextLevelCheck = null;
					}
					nextLevelCheck.remove(o);
				}
			}
		} while (nextLevelCheck != null && !nextLevelCheck.empty)