def dup_err

bend-schema-lib@0.4.1.0 · core.bend:809

import bend-schema-lib@0.4.1.0/core.bend as Core
import Base

809# A second key of a variant chain in the object r: the first one found.
810def dup_err(s: Schema, +r: Raw) -> Maybe<&2, Err>:
811  match s:
812    case SVariant{+n, vs, rest}:
813      pick_err(is_missing(lookup(n, r)), later_f(dup_err(rest, r)), Some{Err{AtField{0n, n} <> Nil{}, TwoVariants{}}})
814    case _:
815      None{}

Uses (11)

Used by (1)