nac3core: fix assign to constant #237

Merged
sb10q merged 1 commits from assign_to_const into master 2022-03-24 09:59:02 +08:00
1 changed files with 3 additions and 0 deletions

View File

@ -46,6 +46,9 @@ impl<'a> Inferencer<'a> {
}
Ok(())
}
ExprKind::Constant { .. } => {
Err(format!("cannot assign to a constant (at {})", pattern.location))
}
_ => self.check_expr(pattern, defined_identifiers),
}
}