Hello.
I stumbled on ambiguous behaviour of compiler. Is not allowed explicitly 
indicate type in Generic typealias.

struct Сarriage<T> {
     let g = [ T ]()
}
 
struct Coma<T> {
     typealias R =  Сarriage < T >
     let m =  R ()
     let d =  R < String >() \\  error: cannot specialize non-generic type 
'Сarriage<T>'
     var b =  Сarriage < String >()
     mutating func work() {
         m .g.append(<#T##newElement: T##T#>) \\ what I can write here?
         b . g . append ( "Z" )
    }
}

-- 
Седых Александр
_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users
  • [swift-users] typealias for ... Седых Александр via swift-users

Reply via email to