re-add nam uses definition

to me this reads like we're renaming definitions to colliding names that
have been imported.

  use List/{length}

  length = 123

is parsed as

  List/length = 123

i do not understand how this is sensible, nor how this breaks when
removed.
This commit is contained in:
Enrico Zandomeni Borba 2024-07-23 21:05:07 +02:00
parent 92677dcaeb
commit c0121aca10

View File

@ -65,6 +65,8 @@ impl<'i> KindParser<'i> {
// Top level definition
self.skip_trivia();
let nam = self.parse_name()?;
// FIXME: this breaks definitions of terms with a name equivalent to one that has been imported.
let nam = uses.get(&nam).unwrap_or(&nam).to_string();
self.skip_trivia();
// Arguments (optional)