From b80865778e8f15d774fea08fbf387200c98d15b9 Mon Sep 17 00:00:00 2001 From: Folkert Date: Mon, 4 Jan 2021 23:35:29 +0100 Subject: [PATCH] literal patterns should have type `Int a` or `Float a` --- compiler/constrain/src/pattern.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/constrain/src/pattern.rs b/compiler/constrain/src/pattern.rs index 918b8e2ab1..8a2f5d9250 100644 --- a/compiler/constrain/src/pattern.rs +++ b/compiler/constrain/src/pattern.rs @@ -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, )); }