Remove Unified BadType

This commit is contained in:
Ayaz Hafiz 2022-11-08 13:40:30 -06:00
parent 09748aec48
commit fb643758bb
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
4 changed files with 3 additions and 54 deletions

View file

@ -943,13 +943,6 @@ fn solve(
problems.push(problem);
state
}
BadType(vars, problem) => {
introduce(subs, rank, pools, &vars);
problems.push(TypeError::BadType(problem));
state
}
}
@ -1067,13 +1060,6 @@ fn solve(
problems.push(problem);
state
}
BadType(vars, problem) => {
introduce(subs, rank, pools, &vars);
problems.push(TypeError::BadType(problem));
state
}
}
@ -1181,13 +1167,6 @@ fn solve(
problems.push(problem);
state
}
BadType(vars, problem) => {
introduce(subs, rank, pools, &vars);
problems.push(TypeError::BadType(problem));
state
}
}
@ -1401,13 +1380,6 @@ fn solve(
);
problems.push(problem);
state
}
BadType(vars, problem) => {
introduce(subs, rank, pools, &vars);
problems.push(TypeError::BadType(problem));
state
}
}
@ -1609,15 +1581,6 @@ fn solve(
}
}
}
BadType(vars, problem) => {
subs.commit_snapshot(snapshot);
introduce(subs, rank, pools, &vars);
problems.push(TypeError::BadType(problem));
should_check_exhaustiveness = false;
}
}
let sketched_rows = constraints.sketched_rows[sketched_rows.index()].clone();
@ -2099,14 +2062,6 @@ fn check_ability_specialization(
problems.push(problem);
Err(())
}
BadType(vars, problem) => {
subs.commit_snapshot(snapshot);
introduce(subs, rank, pools, &vars);
problems.push(TypeError::BadType(problem));
Err(())
}
};
@ -3046,11 +3001,6 @@ fn type_to_variable<'a>(
problems.push(problem);
}
BadType(_vars, problem) => {
// No introduction needed
problems.push(TypeError::BadType(problem));
}
}
}
}