union_no_branch_matched
No alternative in a (union-shape …) accepted the value.
Alternatives are tried in declaration order and the first full match wins; this fires when none does.
Which message you get depends on the value’s shape. SJON asks
what the value is (a number, a string, a symbol, a vector, a
form) and which alternatives a value of that shape could reach
at all, before any bound, member set, head set or reference
check runs. When exactly one could, nothing else was meant, so
the slot reports that alternative’s own code instead:
number_above_max naming the bound it broke, not_member
listing the members, not_head_member listing the heads,
not_cross_ref naming the form the symbol had to be declared
by.
So this code means one of two things. Either the value’s shape
reaches no alternative at all (a string in a number | symbol
slot), or it reaches two or more, which means those alternatives
overlap and only declaration order separates them. Blaming one
would be a guess, so the message names them all. Rewrite the
value to fit one of the shapes listed.
Reachability stops at the shape and does not look further. Two
:underlying form alternatives with different head sets both
reach a form, so a form outside both lands here rather than on
either one.
Run sjon explain union_no_branch_matched to read this at a terminal, browse every code, or work through diagnostics-driven repair if you want the habit rather than the answer.