pub fn member_default(
ast: &Ast,
from: Id<ModuleNode>,
node: &MemberNode,
type_: Id<TypeNode>,
) -> Result<Expr, EncodeError>Expand description
One member’s default: its @default, or its type’s.
§7.2.2.4.4.4.9 puts the explicit one first — “An explicit definition associates a default value with the member at the time where the aggregated type is defined” — and falls back to “the default value of the member type. See Table 9.”
§Errors
EncodeError::NoWriter for a type or a @default this column
cannot spell. Refused rather than replaced by Table 9’s zero: a
member the designer gave a default and a member that got a zero
instead are different samples.