mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 14:24:45 +00:00
Add percision variable in fp/integer eq constraints
This commit is contained in:
parent
5e332cbad9
commit
48f964adf4
17 changed files with 120 additions and 71 deletions
|
@ -96,7 +96,7 @@ pub fn constrain_expr(
|
|||
expected: Expected<Type>,
|
||||
) -> Constraint {
|
||||
match expr {
|
||||
Int(var, _) => int_literal(*var, expected, region),
|
||||
Int(var, percision, _) => int_literal(*var, *percision, expected, region),
|
||||
Num(var, _) => exists(
|
||||
vec![*var],
|
||||
Eq(
|
||||
|
@ -106,7 +106,7 @@ pub fn constrain_expr(
|
|||
region,
|
||||
),
|
||||
),
|
||||
Float(var, _) => float_literal(*var, expected, region),
|
||||
Float(var, percision, _) => float_literal(*var, *percision, expected, region),
|
||||
EmptyRecord => constrain_empty_record(region, expected),
|
||||
Expr::Record { record_var, fields } => {
|
||||
if fields.is_empty() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue