def value.visit
bend-lint-rules@0.2.0.0 · language/unneeded_plus.bend:23
import bend-lint-rules@0.2.0.0/language/unneeded_plus.bend as UnneededPlus
import Base
import bend-lint-api@0.2.0.0/linter/lint.bend as Lint
23
24def value.visit(+u: Unit, +path: List<&2, Lint.Above>, +node: Lint.Node) -> List<&2, String>:
25 match path node:
26 case Con{
27 Lint.Above{Lint.Node{Lint.Application{}, n, s, k, f}, at},
28 up
29 } Lint.Node{Lint.Reference{t}, rn, rs, rk, rf}:
30 Bool.pick(List<&2, String>, U32.is_eq(at, 0), [], [t])
31 case _ Lint.Node{Lint.Reference{t}, rn, rs, rk, rf}:
32 [t]
33 case _ _:
34 []