Skip to content

Commit

Permalink
Update comments, remove redundant assert
Browse files Browse the repository at this point in the history
  • Loading branch information
acl-cqc committed Nov 7, 2023
1 parent 97b265f commit 89b45ed
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions src/extension/infer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -553,17 +553,13 @@ impl UnificationContext {
if loc.1 == Direction::Incoming {
results.insert(loc.0, rs.clone());
}
} else if !depends_on_var.contains(&self.resolve(*meta)) {
// If it depends on some other live meta, that's bad news.
return Err(InferExtensionError::Unsolved { location: *loc });
} else {
// Unsolved nodes must be unsolved because they depend on graph variables.
if !depends_on_var.contains(&self.resolve(*meta)) {
return Err(InferExtensionError::Unsolved { location: *loc });
}
}
// If it ("only"??) depends on graph variables, then we don't have
// a *solution*, but it's fine
}
debug_assert!(self
.extensions
.values()
.all(|m| self.get_solution(m).is_some() || depends_on_var.contains(&self.resolve(*m))));
Ok(results)
}

Expand Down

0 comments on commit 89b45ed

Please sign in to comment.