mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 22:34:45 +00:00
Plain number literals (e.g. 5
) are now Num *
This commit is contained in:
parent
9081b7f2d1
commit
3ecbe0325c
21 changed files with 345 additions and 223 deletions
|
@ -80,6 +80,14 @@ pub fn constrain_expr(
|
|||
) -> Constraint {
|
||||
match expr {
|
||||
Int(var, _) => int_literal(*var, expected, region),
|
||||
Num(var, _) => exists(
|
||||
vec![*var],
|
||||
Eq(
|
||||
Type::Apply(Symbol::NUM_NUM, vec![Type::Variable(*var)]),
|
||||
expected,
|
||||
region,
|
||||
),
|
||||
),
|
||||
Float(var, _) => float_literal(*var, expected, region),
|
||||
EmptyRecord => constrain_empty_record(region, expected),
|
||||
Expr::Record(stored_var, fields) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue