This commit is contained in:
Folkert 2022-02-27 21:53:56 +01:00
parent 5c31234b24
commit db1669154e
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
6 changed files with 118 additions and 64 deletions

View file

@ -242,12 +242,19 @@ pub fn canonicalize_module_defs<'a>(
panic!("TODO gracefully handle shadowing in imports.")
}
}
} else if symbol == Symbol::LIST_LIST || symbol == Symbol::STR_STR {
} else if [
Symbol::LIST_LIST,
Symbol::STR_STR,
Symbol::DICT_DICT,
Symbol::SET_SET,
// Symbol::BOX_BOX,
]
.contains(&symbol)
{
// These are not aliases but Apply's and we make sure they are always in scope
} else {
// This is a type alias
dbg!(scope.aliases.keys().collect::<Vec<_>>());
// the symbol should already be added to the scope when this module is canonicalized
debug_assert!(
scope.contains_alias(symbol),