wrap_bare_cmp_assignment

Function wrap_bare_cmp_assignment 

Source
pub(super) fn wrap_bare_cmp_assignment(s: &str) -> String
Expand description

Wrap <ident> = <rhs> when <rhs> contains a top-level comparison operator. evalexpr’s = type-checks the RHS against the LHS’s stored type; auto-init seeds every variable as Float(0.0), so assigning a bare Boolean from rand(100) >= 30 blows up at runtime.