I\'ve implemented StringLiteralConvertible
, which extends ExtendedGraphemeClusterLiteralConvertible
. It looks like it wants me to implement that to
The problem is related to your extension not conforming to the protocol. If you CMD+Click on the StringLiteralConvertible protocol, to follow it to it's definition, you will find that the typealias StringLiteralType and typealias ExtendedGraphemeClusterLiteralType are set to String.
That being said, you should modify your extension to the following:
extension NSURL : StringLiteralConvertible {
class func convertFromStringLiteral(value: String) -> Self
{
//do what you were going to do
return self()
}
class func convertFromExtendedGraphemeClusterLiteral(value: String) -> Self{
//do what you were going to do
return self()
}
}
Information about typealias is described in "The Swift Programming Language" book from pages 606-609, under the section Associated Types.