Skip to content

Commit

Permalink
fix: Allow for variables to get solved in inference (#478)
Browse files Browse the repository at this point in the history
Variables are _allowed_ to be unsolved in an extension inference
solution, but it's okay if they _are_ solved.
  • Loading branch information
croyzor authored Aug 31, 2023
1 parent 17b7afa commit 730c2d9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/extension/infer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,9 @@ impl UnificationContext {
/// us to come up with a fully concrete solution to pass into validation.
pub fn instantiate_variables(&mut self) {
for m in self.variables.clone().into_iter() {
self.add_solution(m, ExtensionSet::new());
if !self.solved.contains_key(&m) {
self.add_solution(m, ExtensionSet::new());
}
}
self.variables = HashSet::new();
}
Expand Down

0 comments on commit 730c2d9

Please sign in to comment.