mirror of
https://github.com/powdr-labs/powdr.git
synced 2026-05-13 03:00:26 -04:00
Detect duplicate labels.
This commit is contained in:
@@ -649,8 +649,11 @@ impl ASMPILConverter {
|
||||
self.code_lines
|
||||
.iter()
|
||||
.enumerate()
|
||||
.filter_map(|(i, line)| line.label.as_ref().map(|l| (l.clone(), i)))
|
||||
.collect()
|
||||
.filter_map(|(i, line)| line.label.as_ref().map(|l| (l, i)))
|
||||
.fold(HashMap::new(), |mut r, (l, i)| {
|
||||
assert!(r.insert(l.clone(), i).is_none(), "Duplicate label: {l}");
|
||||
r
|
||||
})
|
||||
}
|
||||
|
||||
/// Creates a pair of witness and fixed column and matches them in the lookup.
|
||||
|
||||
Reference in New Issue
Block a user