mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 08:34:33 +00:00
wip
This commit is contained in:
parent
ceb938c9af
commit
46755973d6
8 changed files with 59 additions and 13 deletions
|
@ -268,11 +268,15 @@ fn constrain_pattern(
|
|||
loc_expr.region,
|
||||
);
|
||||
|
||||
state.constraints.push(Constraint::Eq(
|
||||
Type::Variable(*expr_var),
|
||||
expr_expected.clone(),
|
||||
Category::DefaultValue(label.clone()),
|
||||
state.constraints.push(Constraint::Pattern(
|
||||
region,
|
||||
PatternCategory::PatternDefault,
|
||||
Type::Variable(*expr_var),
|
||||
PExpected::ForReason(
|
||||
PReason::OptionalField,
|
||||
pat_type.clone(),
|
||||
loc_expr.region,
|
||||
),
|
||||
));
|
||||
|
||||
state.vars.push(*expr_var);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue