From 1f1f281133046c967d9d559ae8beb20c85416161 Mon Sep 17 00:00:00 2001 From: imaqtkatt Date: Mon, 4 Mar 2024 09:18:31 -0300 Subject: [PATCH] Update shared_names comments --- src/term/check/shared_names.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/term/check/shared_names.rs b/src/term/check/shared_names.rs index bffb1f9a7..0b2c7e958 100644 --- a/src/term/check/shared_names.rs +++ b/src/term/check/shared_names.rs @@ -17,6 +17,8 @@ impl Display for TopLevelErr { } impl Ctx<'_> { + /// Checks if exists shared names from definitions, adts and constructors, allowing constructors + /// share the adt name once. pub fn check_shared_names(&mut self) { let mut checked = IndexMap::<&Name, NameInfo>::new(); @@ -62,9 +64,9 @@ impl NameInfo { impl NameInfo { fn with_ctr(&mut self, current_name: &Name, info: &mut diagnostics::Info) { match self.kind { - NameKind::Adt => {} // Catch by the parser + NameKind::Adt => {} // Error caught by the parser NameKind::Def => info.error(TopLevelErr(current_name.clone())), - NameKind::Ctr => {} // Catch by the parser + NameKind::Ctr => {} // Error caught by the parser } }