mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 00:01:16 +00:00
has -> implements in roc_problem::can::Problem
This commit is contained in:
parent
e04f09231c
commit
17c733ec81
4 changed files with 25 additions and 25 deletions
|
@ -1041,7 +1041,7 @@ fn can_annotation_help(
|
|||
debug_assert!(!clauses.is_empty());
|
||||
|
||||
// Has clauses are allowed only on the top level of a signature, which we handle elsewhere.
|
||||
env.problem(roc_problem::can::Problem::IllegalHasClause {
|
||||
env.problem(roc_problem::can::Problem::IllegalImplementsClause {
|
||||
region: Region::across_all(clauses.iter().map(|clause| &clause.region)),
|
||||
});
|
||||
|
||||
|
@ -1096,13 +1096,13 @@ fn canonicalize_has_clause(
|
|||
// or an ability that was imported from elsewhere
|
||||
&& !scope.abilities_store.is_ability(symbol)
|
||||
{
|
||||
env.problem(roc_problem::can::Problem::HasClauseIsNotAbility { region });
|
||||
env.problem(roc_problem::can::Problem::ImplementsClauseIsNotAbility { region });
|
||||
return Err(Type::Error);
|
||||
}
|
||||
symbol
|
||||
}
|
||||
_ => {
|
||||
env.problem(roc_problem::can::Problem::HasClauseIsNotAbility { region });
|
||||
env.problem(roc_problem::can::Problem::ImplementsClauseIsNotAbility { region });
|
||||
return Err(Type::Error);
|
||||
}
|
||||
};
|
||||
|
@ -1111,7 +1111,7 @@ fn canonicalize_has_clause(
|
|||
let already_seen = can_abilities.insert(ability);
|
||||
|
||||
if already_seen {
|
||||
env.problem(roc_problem::can::Problem::DuplicateHasAbility { ability, region });
|
||||
env.problem(roc_problem::can::Problem::DuplicateImplementsAbility { ability, region });
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue