mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Generic environments and archetypes can be expensive to deserialize if they involve a generic signature not seen before. Also, canonicalize the witness substitutions to eliminate type aliases, and map them to interface types, which again are cheaper to deserialize.
18 lines
327 B
Swift
18 lines
327 B
Swift
public class Base {
|
|
public init() {}
|
|
}
|
|
|
|
public protocol BaseProto {
|
|
func method()
|
|
}
|
|
|
|
extension Base : BaseProto {
|
|
public func method() {}
|
|
}
|
|
|
|
// Make sure we can serialize witness substitutions where replacement types
|
|
// involve generic parameters.
|
|
public class GenericWitness<T> : BaseProto {
|
|
public func method() {}
|
|
}
|