pub fn chain_literal<'a>(
start: &'a ConstDecl,
base: BaseType,
limit: usize,
next: impl FnMut(&str) -> Option<&'a ConstDecl>,
) -> Option<&'a Expr>Expand description
#3445: the literal a constant denotes, following constant-to-constant
references. The one resolution loop every literal-only position shares: the
text of a SQL call (#3065, ADR 0762) and an annotation argument (ADR 0678 C,
as amended). Every constant on the chain must be declared exactly base
(a refined or opaque constant does not count) and the chain must end at a
literal of it. next names the constant a reference points to, in whichever
scope the caller resolves names; limit bounds the walk, since a longer
chain is a cycle already reported as bynk.resolve.const_cycle.