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 package kotlin
// Temporary class for backward compatibility with Java code public open class Unit internal () {
private open class OldUnit() { override fun toString() = "Unit.VALUE"
class object {
public val VALUE: Unit = Unit 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"
}