def Def.returned

bend-lint-api@0.2.0.0 · linter/lint.bend:924

import bend-lint-api@0.2.0.0/linter/lint.bend as Lint
import Base

924# The type a definition's nodes say it returns, as one name, or "".
925def Def.returned(nodes: List<&2, Node>) -> String:
926  match nodes:
927    case Nil{}:
928      ""
929    case Con{Node{Returns{}, n, s, kids, f}, rest}:
930      type_name(kids)
931    case Con{node, rest}:
932      Def.returned(rest)

Uses (5)

Used by (1)