Basic inline class mapping to the underlying representation
This commit is contained in:
Vendored
+26
@@ -0,0 +1,26 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
|
||||
inline class Foo(val x: Int)
|
||||
|
||||
object Test {
|
||||
fun asParam(a: Foo) {}
|
||||
fun asReturn(): Foo = TODO()
|
||||
fun Foo.asExtension() {}
|
||||
fun Foo.asAll(x: Any?, a: Foo, b: Int): Foo = TODO()
|
||||
}
|
||||
|
||||
// method: Test::asParam
|
||||
// jvm signature: (I)V
|
||||
// generic signature: null
|
||||
|
||||
// method: Test::asReturn
|
||||
// jvm signature: ()I
|
||||
// generic signature: null
|
||||
|
||||
// method: Test::asExtension
|
||||
// jvm signature: (I)V
|
||||
// generic signature: null
|
||||
|
||||
// method: Test::asAll
|
||||
// jvm signature: (ILjava/lang/Object;II)I
|
||||
// generic signature: null
|
||||
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
|
||||
inline class Foo(val x: Int?)
|
||||
|
||||
class SimpleClass
|
||||
inline class Bar(val x: SimpleClass)
|
||||
|
||||
object Test {
|
||||
fun asParam(a: Foo) {}
|
||||
fun asReturn(): Bar = TODO()
|
||||
}
|
||||
|
||||
// method: Test::asParam
|
||||
// jvm signature: (Ljava/lang/Integer;)V
|
||||
// generic signature: null
|
||||
|
||||
// method: Test::asReturn
|
||||
// jvm signature: ()LSimpleClass;
|
||||
// generic signature: null
|
||||
Reference in New Issue
Block a user