Created
July 6, 2017 07:32
-
-
Save ezura/b4eb3f871f2e20838975b585ab0f2501 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 S { | |
fun f(v: Int): String = "f" | |
} | |
fun main() { | |
var sf: (S, Int) -> String = S::f | |
var _sf: S.(Int) -> String = sf | |
val sf1: String = sf(S(), 1) | |
val sf2: String = _sf(S(), 1) | |
} |
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 S { | |
func f(_ v: Int) -> String { return "f" } | |
} | |
var sf: (S) -> (Int) -> String = S.f | |
//var _sf: (S, Int) -> String = sf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment