Skip to content

Commit

Permalink
Update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
josh11b committed Nov 8, 2024
1 parent 8c4147f commit e1c474d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
3 changes: 0 additions & 3 deletions toolchain/check/context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -493,9 +493,6 @@ auto Context::LookupQualifiedName(SemIRLoc loc, SemIR::NameId name_id,

// If this is our second lookup result, diagnose an ambiguity.
if (result.inst_id.is_valid()) {
// TODO: This is currently not reachable because the only scope that can
// extend is a class scope, and it can only extend a single base class.
// Add test coverage once this is possible.
CARBON_DIAGNOSTIC(
NameAmbiguousDueToExtend, Error,
"ambiguous use of name `{0}` found in multiple extended scopes",
Expand Down
3 changes: 1 addition & 2 deletions toolchain/sem_ir/name_scope.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,7 @@ struct NameScope : Printable<NameScope> {
// needs to describe the `T*` argument.
//
// Small vector size is set to 1: we expect that there will rarely be more
// than a single extended scope. Currently the only kind of extended scope is
// a base class, and there can be only one of those per scope.
// than a single extended scope.
// TODO: Revisit this once we have more kinds of extended scope and data.
// TODO: Consider using something like `TinyPtrVector` for this.
llvm::SmallVector<NameScopeId, 1> extended_scopes;
Expand Down

0 comments on commit e1c474d

Please sign in to comment.