AST: Generalize GenericSignatureImpl::getUpperBound()

Handle inverses, and add a couple of flags (yuck!) to allow its
usage in diagnostics and code completion.
This commit is contained in:
Slava Pestov
2024-02-01 13:58:16 -05:00
parent 57b768db8c
commit 8092f18772
4 changed files with 80 additions and 32 deletions

View File

@@ -2343,7 +2343,7 @@ static Type typeEraseExistentialSelfReferences(Type refTy, Type baseTy,
if (paramTy->is<GenericTypeParamType>()) {
erasedTy = baseTy;
} else {
erasedTy = existentialSig->getUpperBound(paramTy);
erasedTy = existentialSig->getExistentialType(paramTy);
}
if (metatypeDepth) {