Fix object init/deinit bug, refactoring (#1000)

This commit is contained in:
Nikolay Igotti
2017-11-02 14:37:25 +03:00
committed by GitHub
parent 5f1dc68efc
commit 915d4bc826
6 changed files with 55 additions and 56 deletions
+3 -3
View File
@@ -56,10 +56,10 @@ public final class String : Comparable<String>, CharSequence {
}
// TODO: in big Kotlin this operations are in kotlin.kotlin_builtins.
private val kNullString = "null"
private fun nullString() = "null"
public operator fun kotlin.String?.plus(other: kotlin.Any?): kotlin.String =
(this?.toString() ?: kNullString).plus(other?.toString() ?: kNullString)
(this?.toString() ?: nullString()).plus(other?.toString() ?: nullString())
public fun Any?.toString() = this?.toString() ?: kNullString
public fun Any?.toString() = this?.toString() ?: nullString()