Commit Graph

2 Commits

Author SHA1 Message Date
Slava Pestov
e3d434fbbe Serialization: Serialize ProtocolDecl::getSuperclassDecl() instead of ProtocolDecl::getSuperclass()
Protocols with a superclass bound written as `protocol P where Self: C`
return null from getSuperclass(). Unqualified lookup only cares about
getSuperclassDecl(), so serialize that instead.

Fixes rdar://problem/124478687.
2024-03-21 13:09:21 -04:00
Harlan Haskins
d23101d337 [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
2019-06-18 16:38:09 -07:00