Test class with multiple extend (#4504)

Adds coverage for an existing diagnostic. Code appears to work without
modification.

---------

Co-authored-by: Josh L <josh11b@users.noreply.github.com>
This commit is contained in:
josh11bandJosh L authored and GitHub committed 2024-11-08 16:29:53 +00:00
1 parent cab7818df8
commit bbeb66b5fe
4 files changed
+941 -6

No files matched your search

-3
View File
@@ -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",