mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 07:41:12 +00:00
Merge remote-tracking branch 'origin/trunk' into recursive-layouts
This commit is contained in:
commit
f857203673
64 changed files with 5025 additions and 2214 deletions
|
@ -199,7 +199,7 @@ pub fn constrain_expr(
|
|||
|
||||
exists(vars, And(cons))
|
||||
}
|
||||
Str(_) | BlockStr(_) => Eq(str_type(), expected, Category::Str, region),
|
||||
Str(_) => Eq(str_type(), expected, Category::Str, region),
|
||||
List {
|
||||
elem_var,
|
||||
loc_elems,
|
||||
|
@ -758,7 +758,10 @@ pub fn constrain_expr(
|
|||
Box::new(Type::Variable(*ext_var)),
|
||||
),
|
||||
expected.clone(),
|
||||
Category::TagApply(name.clone()),
|
||||
Category::TagApply {
|
||||
tag_name: name.clone(),
|
||||
args_count: arguments.len(),
|
||||
},
|
||||
region,
|
||||
);
|
||||
let ast_con = Eq(
|
||||
|
|
|
@ -507,7 +507,7 @@ pub fn constrain_expr(
|
|||
]),
|
||||
)
|
||||
}
|
||||
BlockStr(_) | Str(_) => {
|
||||
Str(_) => {
|
||||
let uniq_type = var_store.fresh();
|
||||
let inferred = str_type(Bool::variable(uniq_type));
|
||||
|
||||
|
@ -624,13 +624,19 @@ pub fn constrain_expr(
|
|||
let union_con = Eq(
|
||||
union_type,
|
||||
expected.clone(),
|
||||
Category::TagApply(name.clone()),
|
||||
Category::TagApply {
|
||||
tag_name: name.clone(),
|
||||
args_count: arguments.len(),
|
||||
},
|
||||
region,
|
||||
);
|
||||
let ast_con = Eq(
|
||||
Type::Variable(*variant_var),
|
||||
expected,
|
||||
Category::TagApply(name.clone()),
|
||||
Category::TagApply {
|
||||
tag_name: name.clone(),
|
||||
args_count: arguments.len(),
|
||||
},
|
||||
region,
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue