mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 07:14:46 +00:00
Opaques take @ : %s/\$\([A-Z]\)/@\1/g
This commit is contained in:
parent
e43994530f
commit
f1dc9c8298
20 changed files with 201 additions and 206 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue