Created
June 10, 2014 00:15
-
-
Save zolrath/20632edb82bdb5322652 to your computer and use it in GitHub Desktop.
Partial application of struct method is not allowed
This file contains hidden or 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
// Changing struct to class works swimmingly. | |
struct Test { | |
func returnTwo() -> Int { | |
return 2 | |
} | |
func returnFive() -> Int { | |
let twofunc = returnTwo // Partial application of struct method is not allowed | |
return twofunc() + 3 | |
} | |
} | |
let a = Test() | |
a.returnFive() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment