public typealias Something = Int
public func something() -> Something {
return 42
}
public typealias Test<T> = T
public func test() -> Test<Int> {
return 42
}
When viewing the imported module interface the result will become:
public typealias Something = Int
public func something() -> Something
public typealias Test<T> = T
public func test() -> Int
However I did expect public func test() -> Test<Int>, because the typealias is just a visual marker in that case.
At one point we didn't have the information necessary to properly preserve generic typealiases post-type-checking, but I think we do now. @Slava_Pestov?
I cannot test it on my current machine, but on the other one with Xcode 10 beta 6 it was still the same. So I guess this has not landed in the Swift 4.2 branch, if it was already fixed?
Ah, the generated interface view doesn't go through serialization.
I didn't necessarily mean that we'd fixed the issue yet, just that we had the pieces in place to do so. I don't think we actually changed Serialization to not look through bound generic typealiases.