public protocol Prot { associatedtype Element var p : Int { get } func foo() } public class C1 : Prot { public typealias Element = Int public var p : Int = 0 public func foo() {} public subscript(index: Int) -> Int { return 0 } public subscript(index i: Float) -> Int { return 0 } } public func genfoo(x ix: T1, y iy: T2) {} public extension Prot where Self.Element == Int { final func extfoo() {} } public enum MyEnum : Int { case Blah } protocol Prot1 {} typealias C1Alias = C1 extension C1Alias : Prot1 {}