fixed assumption bug

This commit is contained in:
pca006132 2020-12-29 09:43:49 +08:00 committed by pca006132
parent 422b92f686
commit 94ea2c7a9d

View File

@ -141,6 +141,11 @@ pub fn resolve_call(
resolve_call(ctx, Some(obj.clone()), func, args.clone(), assumptions)
})
.collect();
// `assumption` cannot substitute variable for variable, if assumption contains
// this id before running this function, `obj` would not be a variable, so this
// would not be executed.
// Hence, we lose no information doing this.
assumptions.remove(id);
let results = results?;
if results.iter().all(|v| v == &results[0]) {
return Ok(results[0].clone());