diff --git a/compiler/can/src/def.rs b/compiler/can/src/def.rs index 1838f26fae..fe82944005 100644 --- a/compiler/can/src/def.rs +++ b/compiler/can/src/def.rs @@ -280,12 +280,15 @@ pub fn canonicalize_defs<'a>( ); } + scope.add_alias(symbol, ann.region, can_vars.clone(), can_ann.typ.clone()); + let alias = roc_types::types::Alias { region: ann.region, vars: can_vars, uniqueness: None, typ: can_ann.typ, }; + aliases.insert(symbol, alias); } other => value_defs.push(other),