def Program.callers.go
bend-lint-api@0.2.0.0 · linter/lint.bend:1022
import bend-lint-api@0.2.0.0/linter/lint.bend as Lint
import Base
1022
1023def Program.callers.go(
1024 fuel: Nat,
1025 same: Bool,
1026 +sources: List<&2, Source>,
1027 +defs: Map<&2, Maybe<&2, Def>>,
1028 +callers: Set()
1029) -> Set():
1030 match fuel same:
1031 case _ True{}:
1032 callers
1033 case 0n False{}:
1034 callers
1035 case 1n+f False{}:
1036 +next = Program.callers.pass(sources, defs, callers)
1037 Program.callers.go(f, Nat.is_eq(Set.size(callers), Set.size(next)), sources, defs, next)