mirror of
https://github.com/roc-lang/roc.git
synced 2025-07-24 06:55:15 +00:00
Make sure wrong specializations become error types
This commit is contained in:
parent
3703940da9
commit
c1dbffdad9
1 changed files with 3 additions and 1 deletions
|
@ -1785,9 +1785,11 @@ fn check_ability_specialization(
|
|||
// This def is not specialized for the claimed opaque type, that's an
|
||||
// error.
|
||||
|
||||
// Commit so that `var` persists in subs.
|
||||
// Commit so that the bad signature and its error persists in subs.
|
||||
subs.commit_snapshot(snapshot);
|
||||
|
||||
let (_typ, _problems) = subs.var_to_error_type(symbol_loc_var.value);
|
||||
|
||||
let problem = TypeError::WrongSpecialization {
|
||||
region: symbol_loc_var.region,
|
||||
ability_member: impl_key.ability_member,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue