Files
kotlin-fork/compiler/testData/ir/loweredIr/interpreter/kCallableName.kt
T
Ivan Kylchik 0b22cf6cb9 Rewrite ir interpreter's dump tests to box
Box tests will check the correctness of interpreter, meantime
by dumped ir we can understand that expression was folded.
2022-05-18 21:20:01 +03:00

19 lines
619 B
Kotlin
Vendored

class A(val OK: Int, val somePropertyWithLongName: String) {
fun foo() {}
}
val topLevelProp = 1
const val propertyName1 = A::OK.name
const val propertyName2 = A::somePropertyWithLongName.name
const val methodName = A::foo.name
const val className = ::A.name
const val topLevelPropName = ::topLevelProp.name
fun box(): String {
if (propertyName1 != "OK") return "Fail 1"
if (propertyName2 != "somePropertyWithLongName") return "Fail 2"
if (methodName != "foo") return "Fail 3"
if (className != "<init>") return "Fail 4"
if (topLevelPropName != "topLevelProp") return "Fail 5"
return "OK"
}