Initial version of codegen for inline classes
This commit is contained in:
+18
@@ -0,0 +1,18 @@
|
||||
// !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)
|
||||
}
|
||||
}
|
||||
|
||||
// 2 INVOKESTATIC Foo\$Erased.empty \(I\)V
|
||||
// 2 INVOKESTATIC Foo\$Erased.withParam \(ILjava/lang/String;\)V
|
||||
// 2 INVOKESTATIC Foo\$Erased.withInlineClassParam \(II\)V
|
||||
// 0 INVOKEVIRTUAL
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
|
||||
inline class Foo(val x: Int) {
|
||||
fun empty() {}
|
||||
fun param(y: String) {}
|
||||
fun Any.extension() {}
|
||||
fun Any.extensionAndParam(y: Double) {}
|
||||
|
||||
fun withInlineClassType(c: Foo) {}
|
||||
}
|
||||
|
||||
// method: Foo$Erased::empty
|
||||
// jvm signature: (I)V
|
||||
// generic signature: null
|
||||
|
||||
// method: Foo$Erased::param
|
||||
// jvm signature: (ILjava/lang/String;)V
|
||||
// generic signature: null
|
||||
|
||||
// method: Foo$Erased::extension
|
||||
// jvm signature: (ILjava/lang/Object;)V
|
||||
// generic signature: null
|
||||
|
||||
// method: Foo$Erased::extensionAndParam
|
||||
// jvm signature: (ILjava/lang/Object;D)V
|
||||
// generic signature: null
|
||||
|
||||
// method: Foo$Erased::withInlineClassType
|
||||
// jvm signature: (II)V
|
||||
// generic signature: null
|
||||
Reference in New Issue
Block a user