Skip to content

Instantly share code, notes, and snippets.

@mtitolo
Created February 17, 2016 23:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mtitolo/6b3d990445e7e9e62980 to your computer and use it in GitHub Desktop.
Save mtitolo/6b3d990445e7e9e62980 to your computer and use it in GitHub Desktop.
class BaseClass {
class func entityName() -> String {
return ""
}
}
class FirstClass: BaseClass {
override class func entityName() -> String {
return "FirstClass"
}
}
class SecondClass: BaseClass {
override class func entityName() -> String {
return "SecondClass"
}
}
func somethingWithFirst<T: FirstClass>(someType: T.Type) {
someType.entityName() // Ambiguous use of 'entityName()'
}
func somethingWithSecond<T: SecondClass>(someType: T.Type) {
someType.entityName() // Ambiguous use of 'entityName()'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment