void (@NotNull GrClosableBlock closure) { if (isFlatFlow) { FunctionalBlockBeginInstruction startClosure = new FunctionalBlockBeginInstruction(closure); myFunctionalScopeStack.addLast(closure); addNodeAndCheckPending(startClosure); addPendingEdge(closure, startClosure); addFunctionalExpressionParameters(closure); addControlFlowInstructions(closure); InstructionImpl endClosure = new FunctionalBlockEndInstruction(startClosure); addNode(endClosure); checkPending(closure.getParent(), endClosure); myFunctionalScopeStack.removeLast(); } else { //do not go inside closures except gstring injections if (closure.getParent() instanceof GrStringInjection) { addFunctionalExpressionParameters(closure); super.visitClosure(closure); return; } List<kotlin.Pair<ReadWriteVariableInstruction, VariableDescriptor>> reads = ControlFlowBuilderUtil.getReadsWithoutPriorWrites(ControlFlowUtils.getGroovyControlFlow(closure), false); addReadFromNestedControlFlow(closure, reads); } }