Fix assertion error in unification (hopefully)
Currently, all types that we handle during inference need to be resolved as far as possible at the time. It's maybe too brittle of an invariant; I need to think how we can do this better. This should fix #484 though, I hope (if it's the same case as I managed to reproduce).
This commit is contained in:
committed by
Florian Diebold
parent
f60153ee9e
commit
1212e59bee
@@ -230,6 +230,18 @@ fn test2(a1: *const A, a2: *mut A) {
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn infer_bug_484() {
|
||||
check_inference(
|
||||
r#"
|
||||
fn test() {
|
||||
let x = if true {};
|
||||
}
|
||||
"#,
|
||||
"bug_484.txt",
|
||||
);
|
||||
}
|
||||
|
||||
fn infer(content: &str) -> String {
|
||||
let (db, _, file_id) = MockDatabase::with_single_file(content);
|
||||
let source_file = db.source_file(file_id);
|
||||
|
||||
Reference in New Issue
Block a user