Opaques take @ : %s/\$\([A-Z]\)/@\1/g

This commit is contained in:
Ayaz Hafiz 2022-04-25 12:26:38 -04:00
parent e43994530f
commit f1dc9c8298
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
20 changed files with 201 additions and 206 deletions

View file

@ -134,15 +134,14 @@ impl Scope {
}
/// Check if there is an opaque type alias referenced by `opaque_ref` referenced in the
/// current scope. E.g. `$Age` must reference an opaque `Age` declared in this module, not any
/// current scope. E.g. `@Age` must reference an opaque `Age` declared in this module, not any
/// other!
// TODO(opaques): $->@ in the above comment
pub fn lookup_opaque_ref(
&self,
opaque_ref: &str,
lookup_region: Region,
) -> Result<(Symbol, &Alias), RuntimeError> {
debug_assert!(opaque_ref.starts_with('$'));
debug_assert!(opaque_ref.starts_with('@'));
let opaque = opaque_ref[1..].into();
match self.idents.get(&opaque) {