mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
Fix for test data (inlineFunctionInsideInlineClassesBox.kt) is needed to avoid check about "no inline functions". This check has two steps: first, names of inline functions from the metadata are loaded, then these names are checked that they are presented for physical methods in the classfile. Because now there are no physical methods in the classfile, we can't pass the second check, therefore this fix is needed. #KT-24872 Fixed
18 lines
442 B
Kotlin
Vendored
18 lines
442 B
Kotlin
Vendored
// !LANGUAGE: +InlineClasses
|
|
|
|
inline class Foo(val x: Int) {
|
|
fun empty() {}
|
|
fun withParam(a: String) {}
|
|
fun withInlineClassParam(f: Foo) {}
|
|
|
|
fun test() {
|
|
empty()
|
|
withParam("hello")
|
|
withInlineClassParam(this)
|
|
}
|
|
}
|
|
|
|
// 1 INVOKESTATIC Foo\$Erased.empty \(I\)V
|
|
// 1 INVOKESTATIC Foo\$Erased.withParam \(ILjava/lang/String;\)V
|
|
// 1 INVOKESTATIC Foo\$Erased.withInlineClassParam \(II\)V
|
|
// 5 INVOKEVIRTUAL |