AST: Remove archetype from AbstractTypeParamDecl

There's a bit of a hack to deal with generic typealiases, but
overall this makes things more logical.

This is the last big refactoring before we can allow constrained
extensions to make generic parameters concrete. All that remains
is a small set of changes to SIL type lowering, and retooling
some diagnostics in Sema.
This commit is contained in:
Slava Pestov
2016-09-06 22:07:01 -07:00
parent e6f8843c70
commit a9c68c0736
45 changed files with 500 additions and 426 deletions

View File

@@ -2935,7 +2935,7 @@ public:
if (auto *GP = dyn_cast<GenericTypeParamDecl>(D)) {
addGenericTypeParamRef(GP, Reason);
for (auto *protocol : GP->getConformingProtocols(nullptr))
for (auto *protocol : GP->getConformingProtocols())
addConstructorCallsForType(protocol->getType(), GP->getName(),
Reason);
return;
@@ -3003,7 +3003,7 @@ public:
if (auto *GP = dyn_cast<GenericTypeParamDecl>(D)) {
addGenericTypeParamRef(GP, Reason);
for (auto *protocol : GP->getConformingProtocols(nullptr))
for (auto *protocol : GP->getConformingProtocols())
addConstructorCallsForType(protocol->getType(), GP->getName(),
Reason);
return;