I just was toying around with generic types and protocols that would 'fake' qualified lookup and stumbled accidentally upon this issue which felt odd to me.
protocol Test {
associatedtype Foo
}
struct Generic<Foo, Bar> {}
extension Generic Test where Foo == Bar {}
print(type(of: Generic<String, Int>.Foo.self)) // compiles and prints `String.Type`
I think this shouldn't even compile, no? I've tested it in Swift 4.1 and with 4.2 (wwdc Xcode 10 beta).