internal: Record mismatches of pattern types.

This commit is contained in:
Dawer 2021-05-19 09:23:16 +05:00
parent 49a5d6a8d4
commit 472317c008
6 changed files with 93 additions and 11 deletions

View file

@ -130,7 +130,10 @@ fn infer_with_mismatches(content: &str, include_mismatches: bool) -> String {
}
Err(SyntheticSyntax) => continue,
};
types.push((syntax_ptr, ty));
types.push((syntax_ptr.clone(), ty));
if let Some(mismatch) = inference_result.type_mismatch_for_pat(pat) {
mismatches.push((syntax_ptr, mismatch));
}
}
for (expr, ty) in inference_result.type_of_expr.iter() {