Migrate to calling interfaceType and remove SelfParam

Migrate more tests
This commit is contained in:
Kathy Gray
2025-09-17 18:27:29 +01:00
parent 3eee15f1cb
commit 84ef25afbc
26 changed files with 100 additions and 89 deletions

View File

@@ -16,6 +16,7 @@
#include "CSDiagnostics.h"
#include "MiscDiagnostics.h"
#include "TypeChecker.h"
#include "TypeCheckConcurrency.h"
#include "TypeCheckProtocol.h"
#include "TypeCheckType.h"
@@ -4100,7 +4101,7 @@ bool SubscriptMisuseFailure::diagnoseAsError() {
bool SubscriptMisuseFailure::diagnoseAsNote() {
if (auto overload = getOverloadChoiceIfAvailable(getLocator())) {
auto decl = overload->choice.getDecl();
emitDiagnosticAt(decl, diag::found_candidate_type, decl->getOverloadSignatureType());
emitDiagnosticAt(decl, diag::found_candidate_type, swift::TypeChecker::removeSelfParam(decl,decl->getInterfaceType()));
return true;
}
return false;