module SimpleCov::StaticCoverageExtractor::ValuePositions

def tail_children(node, in_value)

is included regardless of `in_value`.
itself is not (the method still returns its last expression), so it
void default. A method body is a tail context even when the `def`
The children of `node` that inherit its tail position; empty for the
def tail_children(node, in_value)
  # A method body is a tail context even when the `def` is not.
  return [node.body] if node.is_a?(::Prism::DefNode)
  return [] unless in_value
  case node
  when ::Prism::StatementsNode then [node.body.last]
  when ::Prism::IfNode, ::Prism::UnlessNode then [node.statements, subsequent(node)]
  when ::Prism::CaseNode then [*node.conditions, else_clause(node)]
  when ::Prism::ElseNode, ::Prism::WhenNode, ::Prism::BeginNode, ::Prism::ProgramNode then [node.statements]
  else []
  end
end