Refactor analyzer to return impurity

The `Analyzer` is now responsible for determining the purity of `Define`
bindings. Previously, this responsibility was left to the caller.

Added a new example `design-flaw.myc` to test this change.
Updated `soa_series.myc` due to the purity change.
This commit is contained in:
Michael Schimmel
2026-03-10 16:13:39 +01:00
parent 348b1686f2
commit 961168f3b6
4 changed files with 11 additions and 4 deletions
+2 -1
View File
@@ -143,7 +143,8 @@ impl UsageInfo {
self.collect(v);
}
}
BoundKind::Define { value, .. } => {
BoundKind::Define { addr, value, .. } => {
self.assigned.insert(*addr);
self.collect(value);
}
BoundKind::Expansion { bound_expanded, .. } => {