Skip to content

Instantly share code, notes, and snippets.

@zolrath
Created June 10, 2014 00:15
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 zolrath/20632edb82bdb5322652 to your computer and use it in GitHub Desktop.
Save zolrath/20632edb82bdb5322652 to your computer and use it in GitHub Desktop.
Partial application of struct method is not allowed
// 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