[Sema] Compute superclass of deserialized protocols via generic signature

We don't need to serialize the protocol's superclass, we can compute it from the
generic signature. Previously, we would drop the superclass while
serializing because we didn't check the generic signature in
SuperclassTypeRequest, which would cause us to cache `NULL` when we
called `setSuperclass` for a protocol with a superclass constraint.

Fixes rdar://50526401
This commit is contained in:
Harlan Haskins
2019-06-17 18:19:50 -07:00
parent 815ae1f568
commit d23101d337
7 changed files with 61 additions and 16 deletions

View File

@@ -3290,7 +3290,6 @@ public:
/*resolver=*/nullptr),
S.addGenericEnvironmentRef(
proto->getGenericEnvironment()),
S.addTypeRef(proto->getSuperclass()),
rawAccessLevel,
inherited);