add (() -> T).unaryPlus()

This commit is contained in:
tursom 2020-01-19 13:47:33 +08:00
parent 2512e49fa2
commit f17402f3dc

View File

@ -244,7 +244,10 @@ fun ByteArray.digest(type: String) = try {
fun randomInt(min: Int, max: Int) = Random().nextInt(max) % (max - min + 1) + min fun randomInt(min: Int, max: Int) = Random().nextInt(max) % (max - min + 1) + min
fun getTAG(cls: Class<*>): String { fun getTAG(cls: Class<*>): String {
return cls.name.split(".").last().dropLast(10) return cls.name.split(".").last().dropLast(10)
} }
operator fun <T> (() -> T).unaryPlus() = object {
override fun toString() = this@unaryPlus().toString()
}