Files
kotlin-fork/compiler/testData/debug/stepping/callWithReceiver.kt
T
vladislav.grechko f318b5969d Erase non-reified type parameters by-default when inlining.
Substitution of type arguments to non-reified type parameters may lead
to accidental reification, which should not be done (see ^KT-60174 for
examples). So, we should erase them, except the few cases.

^KT-60174: Fixed
^KT-60175: Fixed
2024-01-26 18:31:20 +00:00

49 lines
740 B
Kotlin
Vendored

// FILE: test.kt
class A {
fun foo() = this
inline fun bar() = this
}
fun box() {
val a = A()
a
.foo()
a
.bar()
}
// EXPECTATIONS JVM_IR
// test.kt:10 box
// test.kt:4 <init>
// test.kt:10 box
// test.kt:11 box
// test.kt:12 box
// test.kt:5 foo
// test.kt:12 box
// test.kt:14 box
// test.kt:15 box
// test.kt:6 box
// test.kt:16 box
// EXPECTATIONS JS_IR
// test.kt:10 box
// test.kt:4 <init>
// test.kt:12 box
// test.kt:5 foo
// test.kt:16 box
// EXPECTATIONS WASM
// test.kt:1 $box
// test.kt:10 $box (12, 12)
// test.kt:7 $A.<init>
// test.kt:11 $box
// test.kt:12 $box (6, 6)
// test.kt:5 $A.foo (16, 20)
// test.kt:15 $box (6, 6)
// test.kt:14 $box
// test.kt:6 $box (23, 27)
// test.kt:16 $box