def visit
bend-lint-rules@0.2.0.0 · performance/eager_branch.bend:132
import bend-lint-rules@0.2.0.0/performance/eager_branch.bend as EagerBranch
import Base
import bend-lint-api@0.2.0.0/linter/lint.bend as Lint
import bend-lint-api@0.2.0.0/shared/sets.bend as Sets
132def visit(+owner: Owner, +path: List<&2, Lint.Above>, +node: Lint.Node) -> List<&2, Lint.Finding>:
133 match owner node:
134 case Owner{
135 costly,
136 target
137 } Lint.Node{
138 Lint.Application{},
139 n,
140 s,
141 Con{Lint.Node{Lint.Reference{+called}, callee, rs, rk, rf}, args},
142 f
143 }:
144 looping(
145 Sets.has(costly, called) && Lint.is_live(path),
146 path,
147 callee,
148 String.eq(called, target)
149 )
150 case _ _:
151 []