def loops
import bend-lint-rules@0.2.0.0/performance/list_index_loop.bend as ListIndexLoopimport Base
import bend-lint-api@0.2.0.0/linter/lint.bend as Lint
189# Whether the loop `owner`, if a parameter of it declares the binder `b` (`param`), passes it unchanged to a call of
190# itself (`target`), in the innermost case above `path`.
191def loops(
192 param: Maybe<&2, Nat>,
193 path: List<&2, Lint.Above>,
194 owner: Lint.Node,
195 target: String,
196 b: U32
197) -> Bool:
198 match param:
199 case Some{i}:
200 passes([innermost(path, owner)], target, b, False{})
201 case None{}:
202 False{}