Skip to content

Commit

Permalink
Update shared_names comments
Browse files Browse the repository at this point in the history
  • Loading branch information
imaqtkatt committed Mar 4, 2024
1 parent a179e10 commit 1f1f281
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/term/check/shared_names.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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
}
}

Expand Down

0 comments on commit 1f1f281

Please sign in to comment.