mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
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
16 lines
269 B
Swift
16 lines
269 B
Swift
public protocol P: C {}
|
|
|
|
public class C: P {
|
|
public init() {}
|
|
public func funcInClass() {}
|
|
}
|
|
|
|
public protocol GenericP: GenericC<Int> {}
|
|
|
|
public class GenericC<T> {
|
|
public init() {}
|
|
public func funcInClass() {}
|
|
}
|
|
|
|
extension GenericC: GenericP where T == Int {}
|