mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 16:21:11 +00:00
Add some internal error assertions
This commit is contained in:
parent
d0bd08dbe0
commit
2cacda00eb
1 changed files with 2 additions and 4 deletions
|
@ -1966,10 +1966,8 @@ fn type_to_variable<'a>(
|
||||||
match *subs.get_content_without_compacting(var) {
|
match *subs.get_content_without_compacting(var) {
|
||||||
FlexVar(opt_name) => subs
|
FlexVar(opt_name) => subs
|
||||||
.set_content(var, FlexAbleVar(opt_name, *ability)),
|
.set_content(var, FlexAbleVar(opt_name, *ability)),
|
||||||
RigidVar(name) => subs.set_content(
|
RigidVar(..) => internal_error!("Rigid var in type arg for {:?} - this is a bug in the solver, or our understanding", actual),
|
||||||
var,
|
RigidAbleVar(..) | FlexAbleVar(..) => internal_error!("Able var in type arg for {:?} - this is a bug in the solver, or our understanding", actual),
|
||||||
FlexAbleVar(Some(name), *ability),
|
|
||||||
),
|
|
||||||
_ => {
|
_ => {
|
||||||
// TODO associate the type to the bound ability, and check
|
// TODO associate the type to the bound ability, and check
|
||||||
// that it correctly implements the ability.
|
// that it correctly implements the ability.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue