Commit 87cb0d37 authored by Philip Makedonski's avatar Philip Makedonski
Browse files

+ fix for #2, deadlock in checkNoOverSpecificRunsOn

parent c5ec6846
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -1035,6 +1035,7 @@ class CodeStyleValidator extends AbstractDeclarativeValidator {
	private def boolean isReferencedInHierarchy(TTCN3Reference parent, ArrayList<TTCN3Reference> consideredAltOrFunc) {
		var ArrayList<TTCN3Reference> nextLevelCheck = parent.nextLevelFunctionsOrAltsteps(consideredAltOrFunc)
		do {
			//TODO: Why is there a for loop in a while loop?! -> removing seems to fix the issue as well
			for (o : nextLevelCheck) {
				if (o instanceof FunctionDef) {
					if (o.runsOn != null) {
@@ -1046,7 +1047,11 @@ class CodeStyleValidator extends AbstractDeclarativeValidator {
								var ArrayList<TTCN3Reference> nlc = new ArrayList<TTCN3Reference>()
								nlc.addAll(nextLevelCheck)
								nlc.remove(o)
								nlc.addAll(o.nextLevelFunctionsOrAltsteps(consideredAltOrFunc))
								//add next level checks to considered 
								//TODO: double check for issues
								consideredAltOrFunc.addAll(nextLevelCheck)
								var nlfa = o.nextLevelFunctionsOrAltsteps(consideredAltOrFunc)
								nlc.addAll(nlfa)
								nextLevelCheck = nlc
							}
						}