mirror of
https://github.com/roc-lang/roc.git
synced 2025-07-31 02:13:45 +00:00
Remove problems from error type API surface
This commit is contained in:
parent
b6322ff883
commit
09748aec48
5 changed files with 32 additions and 45 deletions
|
@ -2013,7 +2013,7 @@ fn check_ability_specialization(
|
|||
// Commit so that the bad signature and its error persists in subs.
|
||||
subs.commit_snapshot(snapshot);
|
||||
|
||||
let (_typ, _problems) =
|
||||
let _typ =
|
||||
subs.var_to_error_type(symbol_loc_var.value, Polarity::OF_VALUE);
|
||||
|
||||
let problem = TypeError::WrongSpecialization {
|
||||
|
@ -2034,7 +2034,7 @@ fn check_ability_specialization(
|
|||
// Commit so that `var` persists in subs.
|
||||
subs.commit_snapshot(snapshot);
|
||||
|
||||
let (typ, _problems) = subs.var_to_error_type(var, Polarity::OF_VALUE);
|
||||
let typ = subs.var_to_error_type(var, Polarity::OF_VALUE);
|
||||
|
||||
let problem = TypeError::StructuralSpecialization {
|
||||
region: symbol_loc_var.region,
|
||||
|
@ -2056,9 +2056,9 @@ fn check_ability_specialization(
|
|||
// so we can have two separate error types.
|
||||
subs.rollback_to(snapshot);
|
||||
|
||||
let (expected_type, _problems) =
|
||||
let expected_type =
|
||||
subs.var_to_error_type(root_signature_var, Polarity::OF_VALUE);
|
||||
let (actual_type, _problems) =
|
||||
let actual_type =
|
||||
subs.var_to_error_type(symbol_loc_var.value, Polarity::OF_VALUE);
|
||||
|
||||
let reason = Reason::GeneralizedAbilityMemberSpecialization {
|
||||
|
@ -3492,7 +3492,7 @@ fn circular_error(
|
|||
loc_var: &Loc<Variable>,
|
||||
) {
|
||||
let var = loc_var.value;
|
||||
let (error_type, _) = subs.var_to_error_type(var, Polarity::OF_VALUE);
|
||||
let error_type = subs.var_to_error_type(var, Polarity::OF_VALUE);
|
||||
let problem = TypeError::CircularType(loc_var.region, symbol, error_type);
|
||||
|
||||
subs.set_content(var, Content::Error);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue