mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 07:41:12 +00:00
Fix total_problems calculation
This commit is contained in:
parent
0dd1395331
commit
fc1be5d90b
1 changed files with 15 additions and 1 deletions
|
@ -723,7 +723,21 @@ pub struct MonomorphizedModule<'a> {
|
|||
|
||||
impl<'a> MonomorphizedModule<'a> {
|
||||
pub fn total_problems(&self) -> usize {
|
||||
self.can_problems.len() + self.type_problems.len() + self.mono_problems.len()
|
||||
let mut total = 0;
|
||||
|
||||
for problems in self.can_problems.values() {
|
||||
total += problems.len();
|
||||
}
|
||||
|
||||
for problems in self.type_problems.values() {
|
||||
total += problems.len();
|
||||
}
|
||||
|
||||
for problems in self.mono_problems.values() {
|
||||
total += problems.len();
|
||||
}
|
||||
|
||||
total
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue