struct Path<T1, T2> {} struct PathConstructor<T1, T2> { typealias PathType = Path<T1, T2> } extension<T3, T4> PathConstructor where T2 == PathConstructor<T3, T4> { typealias PathType = Path<T1, T2.PathType> } extension PathConstructor { func create(path: [String]) -> PathType { fatalError() } }
(edited)