def Program.callers

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

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

1039# `seeds`, and the definitions of the program (`defs`, of `sources`) that call one of them, directly or through others.
1040# A definition calls only those above it, unless it is @unsafe, and the check gives a file's imports before it, so the
1041# first pass, in order, finds nearly all. Each pass but the last adds one at least, so as many passes as there are
1042# definitions find them all.
1043def Program.callers(
1044  sources: List<&2, Source>,
1045  +defs: Map<&2, Maybe<&2, Def>>,
1046  seeds: Set()
1047) -> Set():
1048  Program.callers.go(Map.size(&2, Maybe<&2, Def>, defs), False{}, sources, defs, seeds)

Uses (9)

Used by (2)