Created
February 17, 2016 23:08
-
-
Save mtitolo/6b3d990445e7e9e62980 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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