mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
AST: Rename GenericContext::isGeneric to hasGenericParamList
`isGeneric` is a misleading name because this method checks for the existence of a `GenericParamList`, which is not implied by genericity.
This commit is contained in:
@@ -610,7 +610,7 @@ public:
|
||||
bool imported = false;
|
||||
if (TAD->hasClangNode())
|
||||
imported = addImport(TD);
|
||||
assert((imported || !TAD->isGeneric()) &&
|
||||
assert((imported || !TAD->hasGenericParamList()) &&
|
||||
"referencing non-imported generic typealias?");
|
||||
} else if (addImport(TD)) {
|
||||
return;
|
||||
@@ -1109,7 +1109,7 @@ public:
|
||||
vd, [this](const NominalTypeDecl *decl) {
|
||||
return printer.isZeroSized(decl);
|
||||
});
|
||||
if (nmtd->isGeneric()) {
|
||||
if (nmtd->hasGenericParamList()) {
|
||||
auto genericSignature =
|
||||
nmtd->getGenericSignature().getCanonicalSignature();
|
||||
ClangSyntaxPrinter(nmtd->getASTContext(), os).printGenericSignature(genericSignature);
|
||||
|
||||
Reference in New Issue
Block a user