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:
@@ -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"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user