fd76a34277
This doesn't reduce the quality of tests, because the flags are still printed for declarations themselves. We only omit them in references. However, this makes the tests more compatible with non-JVM backends (see KT-58605), because flags of referenced stdlib declarations may differ among target platforms.
22 lines
339 B
Kotlin
Vendored
22 lines
339 B
Kotlin
Vendored
class Ref(var value: Int)
|
|
|
|
interface IHost {
|
|
fun String.extLength() = length
|
|
}
|
|
|
|
fun test1(x: String?) = x?.length
|
|
fun test2(x: String?) = x?.hashCode()
|
|
fun test3(x: String?, y: Any?) = x?.equals(y)
|
|
|
|
fun test4(x: Ref?) {
|
|
x?.value = 0
|
|
}
|
|
|
|
fun IHost.test5(s: String?) = s?.extLength()
|
|
|
|
fun Int.foo() = 239
|
|
|
|
fun box() {
|
|
42?.foo()
|
|
}
|