Make sure type variables bound to abilities are instantiated in aliases

Closes #4259
This commit is contained in:
Ayaz Hafiz 2022-10-11 15:04:38 -05:00
parent 89a4522faa
commit 20e4295eea
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
8 changed files with 435 additions and 66 deletions

View file

@ -3,7 +3,7 @@ use roc_can::constraint::{Constraint, Constraints};
use roc_can::expected::Expected::{self, *};
use roc_can::num::{FloatBound, FloatWidth, IntBound, IntLitWidth, NumBound, SignDemand};
use roc_module::symbol::Symbol;
use roc_region::all::Region;
use roc_region::all::{Loc, Region};
use roc_types::num::{NumericRange, SingleQuoteBound};
use roc_types::subs::Variable;
use roc_types::types::Type::{self, *};
@ -198,7 +198,11 @@ pub fn num_literal(
#[inline(always)]
pub fn builtin_type(symbol: Symbol, args: Vec<Type>) -> Type {
Type::Apply(symbol, args, Region::zero())
Type::Apply(
symbol,
args.into_iter().map(Loc::at_zero).collect(),
Region::zero(),
)
}
#[inline(always)]