Builtins: made Unit object.

This commit is contained in:
Zalim Bashorov
2014-04-26 15:28:44 +04:00
parent 915bb208f0
commit 3ef624f121
+10 -4
View File
@@ -16,10 +16,16 @@
package kotlin
public class Unit private() {
override fun toString() = "Unit.VALUE"
// Temporary class for backward compatibility with Java code
private open class OldUnit() {
class object {
public val VALUE: Unit = Unit()
public val VALUE: Unit = Unit
}
}
public object Unit : OldUnit() {
public val VALUE: Unit
get() = this
override fun toString() = "Unit.VALUE"
}