Don't include DelayedAlias in illegal cycle checks

This commit is contained in:
Ayaz Hafiz 2022-07-10 13:53:41 -04:00
parent 25ba744cdd
commit c211ec9790
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
2 changed files with 19 additions and 0 deletions

View file

@ -1482,6 +1482,8 @@ impl Type {
Type::Apply(Symbol::LIST_LIST | Symbol::SET_SET, _, _) => false,
Type::Apply(..) => internal_error!("cannot chase an Apply!"),
Type::Alias { .. } => internal_error!("should be dealiased"),
// Must be conservative here because we don't know what the alias expands to yet
Type::DelayedAlias(..) => false,
// Non-composite types are trivially narrow
_ => true,
}