Supporting Unit.VALUE, to replace #()

#KT-2358 In Progress
This commit is contained in:
Andrey Breslav
2012-09-18 12:20:23 +04:00
parent 83bc835343
commit dee5152f9b
16 changed files with 206 additions and 47 deletions
+5 -1
View File
@@ -1123,7 +1123,11 @@ public open class jet.Throwable : jet.Any {
public final fun printStackTrace(): jet.Tuple0
}
public final class jet.Tuple0 : jet.Any {
public final /*constructor*/ fun <init>(): jet.Tuple0
private final /*constructor*/ fun <init>(): jet.Tuple0
public final class object jet.Tuple0.<class-object-for-Tuple0> : jet.Any {
private final /*constructor*/ fun <init>(): jet.Tuple0.<class-object-for-Tuple0>
public final val VALUE: jet.Tuple0
}
}
public final class jet.Tuple1</*0*/ out T1 : jet.Any?> : jet.Any {
public final /*constructor*/ fun </*0*/ out T1 : jet.Any?><init>(/*0*/ _1: T1): jet.Tuple1<T1>
@@ -0,0 +1,5 @@
fun foo() {}
fun box(): String {
return if (foo() == Unit.VALUE) "OK" else "Fail"
}
@@ -0,0 +1,3 @@
fun test() {
return Unit.VALUE : Unit
}