Don't qualify names after a . in an ImplWitnessAccess when stringifying (#7000)

After the `.` comes a member of the target of the ImplWitnessAccess.
It's already qualified, don't add the namespace/package to the name.
This commit is contained in:
Dana Jansens
2026-04-01 15:24:57 +00:00
committed by GitHub
parent 17180558e5
commit 8f3b057179
2 changed files with 42 additions and 9 deletions
@@ -842,7 +842,7 @@ fn Sum[U:! type, T:! Core.AddWith(U) where .Result = U](a: T, b: U) -> U {
return a + b;
}
fn Call(x: Cpp.X) -> Cpp.X {
// CHECK:STDERR: fail_todo_constraints.carbon:[[@LINE+7]]:10: error: cannot convert type `Cpp.X` into type implementing `Core.AddWith(Cpp.X) where .(Core.AddWith(Cpp.X).Core.Result) = Cpp.X` [ConversionFailureTypeToFacet]
// CHECK:STDERR: fail_todo_constraints.carbon:[[@LINE+7]]:10: error: cannot convert type `Cpp.X` into type implementing `Core.AddWith(Cpp.X) where .(Core.AddWith(Cpp.X).Result) = Cpp.X` [ConversionFailureTypeToFacet]
// CHECK:STDERR: return Sum(x, x);
// CHECK:STDERR: ^~~~~~~~~
// CHECK:STDERR: fail_todo_constraints.carbon:[[@LINE-7]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere]