mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 16:44:33 +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);
|
||||
}
|
||||
}
|
||||
Pattern(_, _, _, _) => {
|
||||
panic!("TODO solve patterns");
|
||||
Pattern(_region, _category, typ, expected) => {
|
||||
// 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) => {
|
||||
match let_con.ret_constraint {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue