Created
October 9, 2015 19:55
-
-
Save adamkuipers/1126ad09a0478d64f069 to your computer and use it in GitHub Desktop.
Function overloading swift bug
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
// Doesn't work. | |
func doBimpy(f1: Bimpy, _ f2: Bimpy) -> Bimpy { | |
return Bimpy() | |
} | |
// Works | |
func doBimpy2(f1: Bimpy, _ f2: Bimpy) -> Bimpy { | |
return Bimpy() | |
} | |
class Bimpy { | |
func doBimpy() -> Bimpy { | |
return Bimpy() | |
} | |
func doBimpyWith(f: Bimpy) -> Bimpy { | |
return doBimpy(self, f) | |
} | |
func doBimpyWith2(f: Bimpy) -> Bimpy { | |
return doBimpy2(self, f) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment