diff --git a/nac3core/src/typecheck/type_inferencer/mod.rs b/nac3core/src/typecheck/type_inferencer/mod.rs
index 06d473ff..8d05c6d2 100644
--- a/nac3core/src/typecheck/type_inferencer/mod.rs
+++ b/nac3core/src/typecheck/type_inferencer/mod.rs
@@ -389,7 +389,7 @@ impl<'a> Fold<()> for Inferencer<'a> {
}
ast::StmtKind::Assign { targets, value, .. } => {
for target in targets {
- self.unify(target.custom.unwrap(), value.custom.unwrap(), &target.location)?;
+ self.fold_assign(target, value)?;
}
}
ast::StmtKind::Raise { exc, cause, .. } => {
@@ -2159,4 +2159,58 @@ impl<'a> Inferencer<'a> {
self.constrain(body.custom.unwrap(), orelse.custom.unwrap(), &body.location)?;
Ok(body.custom.unwrap())
}
+
+ fn fold_assign(
+ &mut self,
+ target: &ast::Expr