backend/tests: Add blackbox tests from Kotlin JVM
Added tests from testData/codegen/box directory. There are blackbox tests in other directories and they are to be added.
This commit is contained in:
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
class Delegate {
|
||||
operator fun getValue(t: F.A, p: KProperty<*>): Int = 1
|
||||
}
|
||||
|
||||
class F {
|
||||
val A.prop: Int by Delegate()
|
||||
|
||||
class A {
|
||||
}
|
||||
|
||||
fun foo(): Int {
|
||||
return A().prop
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
return if(F().foo() == 1) "OK" else "fail"
|
||||
}
|
||||
Reference in New Issue
Block a user