mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
ExtensionDecls for nested generic types have multiple generic parameter lists, one for each level of nested generic context. We only serialized the outermost list, though. This didn't cause any problems as far as I can see because most of the time we seem to use the GenericSignature instead, which has the correct generic parameters. However since we still have usages of getGenericParamsOfContext() on deserialized DeclContexts, better safe than sorry. I added a test; the test used to pass on master, but with the new assertion I added, it would fail without the other changes in this patch.
12 lines
171 B
Swift
12 lines
171 B
Swift
public struct Outer<T> {
|
|
public struct Inner<U> {
|
|
public init() {}
|
|
}
|
|
}
|
|
|
|
extension Outer.Inner {
|
|
public func extensionMethod(t: T) -> U {
|
|
while true {}
|
|
}
|
|
}
|