1
0
forked from M-Labs/nac3

nac3core: fix assign to constant

This commit is contained in:
ychenfo 2022-03-24 07:13:13 +08:00
parent ec52128a4a
commit be75fa7368

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),
}
}