Files
swift-mirror/test/Serialization/Inputs/has_nested_generic_extension.swift
Slava Pestov 18fbfd46c5 Serialization: Fix latent bug with extensions of nested generic types
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.
2017-03-13 19:33:30 -07:00

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 {}
}
}