Files
kotlin-fork/compiler/testData/codegen/bytecodeListing/callableReferenceArrayConstructorArguments.kt
Ivan Kylchik c7435ba760 Replace all occurrences of WITH_RUNTIME with WITH_STDLIB
We are going to deprecate `WITH_RUNTIME` directive. The main reason
behind this change is that `WITH_STDLIB` directive better describes
its meaning, specifically it will add kotlin stdlib to test's classpath.
2021-11-17 15:26:38 +03:00

17 lines
399 B
Kotlin
Vendored

// WITH_STDLIB
fun foo1(x: Int) = x
fun foo2(vararg x: Int) = x[0]
fun Int.foo3() = this
fun IntArray.foo4(x: Int) = this[x]
val Int.foo5 get() = this
fun test() {
// None of this should create any Function1 implementations because IntArray is inline.
IntArray(1, ::foo1)
IntArray(1, ::foo2)
IntArray(1, Int::foo3)
IntArray(1, intArrayOf(0)::foo4)
IntArray(1, Int::foo5)
}