mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 15:21:12 +00:00
literal patterns should have type Int a
or Float a
This commit is contained in:
parent
664a232cb1
commit
b80865778e
1 changed files with 2 additions and 2 deletions
|
@ -158,7 +158,7 @@ pub fn constrain_pattern(
|
||||||
state.constraints.push(Constraint::Pattern(
|
state.constraints.push(Constraint::Pattern(
|
||||||
region,
|
region,
|
||||||
PatternCategory::Int,
|
PatternCategory::Int,
|
||||||
builtins::num_integer(Type::Variable(*precision_var)),
|
builtins::num_int(Type::Variable(*precision_var)),
|
||||||
expected,
|
expected,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
@ -167,7 +167,7 @@ pub fn constrain_pattern(
|
||||||
state.constraints.push(Constraint::Pattern(
|
state.constraints.push(Constraint::Pattern(
|
||||||
region,
|
region,
|
||||||
PatternCategory::Float,
|
PatternCategory::Float,
|
||||||
builtins::num_floatingpoint(Type::Variable(*precision_var)),
|
builtins::num_float(Type::Variable(*precision_var)),
|
||||||
expected,
|
expected,
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue