use Reason::NumLiteral in uniqueness inference

we can 'just' do that here because there is a var_store available. That isn't true for normal inference, where we would have to put the variable in during solving
This commit is contained in:
Folkert 2020-03-11 14:07:49 +01:00
parent 55623605f3
commit 9ba09c7d82

View file

@ -369,7 +369,7 @@ pub fn constrain_expr(
And(vec![
Eq(
Type::Variable(*var),
Expected::ForReason(Reason::IntLiteral, num_type, region),
Expected::ForReason(Reason::NumLiteral, num_type, region),
region,
),
Eq(Type::Variable(*var), expected, region),