mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-04 00:54:36 +00:00
Solve Pattern constraints
This commit is contained in:
parent
cf1306c463
commit
4611211d34
1 changed files with 6 additions and 2 deletions
|
@ -31,8 +31,12 @@ pub fn solve(env: &Env, subs: &mut Subs, constraint: &Constraint) {
|
||||||
solve(env, subs, sub_constraint);
|
solve(env, subs, sub_constraint);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Pattern(_, _, _, _) => {
|
Pattern(_region, _category, typ, expected) => {
|
||||||
panic!("TODO solve patterns");
|
// TODO use region?
|
||||||
|
let actual = type_to_variable(subs, typ.clone());
|
||||||
|
let expected = type_to_variable(subs, expected.clone().get_type());
|
||||||
|
|
||||||
|
subs.union(actual, expected);
|
||||||
}
|
}
|
||||||
Let(let_con) => {
|
Let(let_con) => {
|
||||||
match let_con.ret_constraint {
|
match let_con.ret_constraint {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue