void (@NotNull RootStatement root) { LinkedList<Statement> statements = new LinkedList<>(); statements.add(root); while (!statements.isEmpty()) { Statement statement = statements.removeFirst(); List<VarExprent> catchVariables = null; if (statement.type == StatementType.CATCH_ALL) { catchVariables = ((CatchAllStatement)statement).getVars(); } else if (statement.type == StatementType.TRY_CATCH) { catchVariables = ((CatchStatement)statement).getVars(); } if (catchVariables != null) { for (VarExprent catchVariable : catchVariables) { minExprentTypes.put(new VarVersionPair(catchVariable.getIndex(), 1), catchVariable.getVarType()); maxExprentTypes.put(new VarVersionPair(catchVariable.getIndex(), 1), catchVariable.getVarType()); } } statements.addAll(statement.getStats()); } }