mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 07:14:46 +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(
|
||||
region,
|
||||
PatternCategory::Int,
|
||||
builtins::num_integer(Type::Variable(*precision_var)),
|
||||
builtins::num_int(Type::Variable(*precision_var)),
|
||||
expected,
|
||||
));
|
||||
}
|
||||
|
@ -167,7 +167,7 @@ pub fn constrain_pattern(
|
|||
state.constraints.push(Constraint::Pattern(
|
||||
region,
|
||||
PatternCategory::Float,
|
||||
builtins::num_floatingpoint(Type::Variable(*precision_var)),
|
||||
builtins::num_float(Type::Variable(*precision_var)),
|
||||
expected,
|
||||
));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue