Builtins: make Unit class to avoid binary compatibility problems.

This commit is contained in:
Zalim Bashorov
2014-07-10 23:38:25 +04:00
parent 6182f2cf66
commit 9b36327046
+5 -11
View File
@@ -16,16 +16,10 @@
package kotlin
// Temporary class for backward compatibility with Java code
private open class OldUnit() {
class object {
public val VALUE: Unit = Unit
public open class Unit internal () {
override fun toString() = "Unit.VALUE"
public class object : Unit() {
public val VALUE: Unit = this: Any as Unit
}
}
public object Unit : OldUnit() {
public val VALUE: Unit
get() = this
override fun toString() = "Unit.VALUE"
}