Skip to main content

member_default

Function member_default 

Source
pub fn member_default(
    ast: &Ast,
    node: &MemberNode,
    type_: Id<TypeNode>,
    place: Expr,
) -> Result<Vec<Stat>, 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.

§Errors

EncodeError::NoWriter where a @default names a value this column cannot spell as a JavaScript expression — refused rather than replaced by Table 9’s zero, which is a different sample.