Skip to content

Commit bbeb66b

Browse files
authored
Test class with multiple extend (#4504)
Adds coverage for an existing diagnostic. Code appears to work without modification. --------- Co-authored-by: Josh L <[email protected]>
1 parent cab7818 commit bbeb66b

File tree

4 files changed

+941
-6
lines changed

4 files changed

+941
-6
lines changed

toolchain/check/context.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -493,9 +493,6 @@ auto Context::LookupQualifiedName(SemIRLoc loc, SemIR::NameId name_id,
493493

494494
// If this is our second lookup result, diagnose an ambiguity.
495495
if (result.inst_id.is_valid()) {
496-
// TODO: This is currently not reachable because the only scope that can
497-
// extend is a class scope, and it can only extend a single base class.
498-
// Add test coverage once this is possible.
499496
CARBON_DIAGNOSTIC(
500497
NameAmbiguousDueToExtend, Error,
501498
"ambiguous use of name `{0}` found in multiple extended scopes",

0 commit comments

Comments
 (0)