Use FunctionImplN instead of FunctionN in codegen

Superclass of closures should now be FunctionImplN instead of FunctionN. Since
these -Impl classes are needed only in JVM, the corresponding descriptors and
types are created in the back-end only.
This commit is contained in:
Alexander Udalov
2013-03-21 20:39:01 +04:00
parent 6f6cb03549
commit 974df0ed8e
7 changed files with 58 additions and 14 deletions
@@ -1,9 +1,9 @@
class Works() : jet.Function0<Object>() {
class Works() : jet.Function0<Object> {
public override fun invoke():Object {
return "Works" as Object
}
}
class Broken() : jet.Function0<String>() {
class Broken() : jet.Function0<String> {
public override fun invoke():String {
return "Broken"
}
@@ -7,7 +7,7 @@ val getter: String
fun f() = { "OK" }()
val obj = object : Function0<String>() {
val obj = object : Function0<String> {
override fun invoke() = "OK"
}
@@ -5,7 +5,7 @@ val getter: String
fun f() = { "OK" }()
val obj = object : Function0<String>() {
val obj = object : Function0<String> {
override fun invoke() = "OK"
}