mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 11:52:19 +00:00
Merge pull request #4579 from roc-lang/underivable-rigid-better-error
Suggest binding type variables to an ability when they're unsatisfied
This commit is contained in:
commit
791025d3ed
2 changed files with 35 additions and 2 deletions
|
@ -502,7 +502,7 @@ trait DerivableVisitor {
|
|||
if abilities != [Self::ABILITY] {
|
||||
Err(NotDerivable {
|
||||
var,
|
||||
context: NotDerivableContext::NoContext,
|
||||
context: NotDerivableContext::UnboundVar,
|
||||
})
|
||||
} else {
|
||||
Ok(())
|
||||
|
@ -634,7 +634,7 @@ trait DerivableVisitor {
|
|||
RigidVar(_) => {
|
||||
return Err(NotDerivable {
|
||||
var,
|
||||
context: NotDerivableContext::NoContext,
|
||||
context: NotDerivableContext::UnboundVar,
|
||||
})
|
||||
}
|
||||
FlexAbleVar(opt_name, abilities) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue