Inline (wrapper) class IC extends erased inline class IC$Erased
This commit is contained in:
+16
@@ -0,0 +1,16 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
|
||||
interface IFoo {
|
||||
fun foo(): String
|
||||
}
|
||||
|
||||
inline class IC(val x: String) : IFoo {
|
||||
private fun privateFun() = x
|
||||
override fun foo() = privateFun()
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val x: IFoo = IC("OK")
|
||||
return x.foo()
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
|
||||
inline class IC(val x: String) {
|
||||
private fun privateFun() = x
|
||||
override fun toString() = privateFun()
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val x: Any = IC("OK")
|
||||
return x.toString()
|
||||
}
|
||||
+2
@@ -14,6 +14,8 @@ inline class A(val x: Int) {
|
||||
inline fun stub() {}
|
||||
|
||||
// FILE: 2.kt
|
||||
// NO_CHECK_LAMBDA_INLINING
|
||||
// ^ TODO
|
||||
|
||||
import test.*
|
||||
|
||||
|
||||
Vendored
+2
-1
@@ -7,7 +7,8 @@ public final class Foo$Companion {
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final static class Foo$Erased {
|
||||
public static class Foo$Erased {
|
||||
method <init>(): void
|
||||
public final static @org.jetbrains.annotations.NotNull method box(p0: int): Foo
|
||||
public static method constructor(p0: int): int
|
||||
public static method equals(p0: int, @org.jetbrains.annotations.Nullable p1: java.lang.Object): boolean
|
||||
|
||||
Vendored
+2
-1
@@ -1,5 +1,6 @@
|
||||
@kotlin.Metadata
|
||||
public final static class Foo$Erased {
|
||||
public static class Foo$Erased {
|
||||
method <init>(): void
|
||||
public final static @org.jetbrains.annotations.NotNull method box(p0: int): Foo
|
||||
public static method constructor(p0: int): int
|
||||
public static method equals(p0: int, @org.jetbrains.annotations.Nullable p1: java.lang.Object): boolean
|
||||
|
||||
+2
-1
@@ -4,7 +4,8 @@ public interface A {
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final static class Foo$Erased {
|
||||
public static class Foo$Erased {
|
||||
method <init>(): void
|
||||
public final static @org.jetbrains.annotations.NotNull method box(p0: long): Foo
|
||||
public static method constructor(p0: long): long
|
||||
public static method equals(p0: long, @org.jetbrains.annotations.Nullable p1: java.lang.Object): boolean
|
||||
|
||||
Vendored
+2
-1
@@ -1,5 +1,6 @@
|
||||
@kotlin.Metadata
|
||||
public final static class Foo$Erased {
|
||||
public static class Foo$Erased {
|
||||
method <init>(): void
|
||||
public final static @org.jetbrains.annotations.NotNull method box(p0: long): Foo
|
||||
public static method constructor(p0: long): long
|
||||
public final static method empty(p0: long): void
|
||||
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
|
||||
inline class Z(val x: Int)
|
||||
|
||||
interface IFoo
|
||||
interface IBar
|
||||
inline class FooBar(val x: Int) : IFoo, IBar
|
||||
|
||||
// 1 public final class Z extends Z\$Erased
|
||||
// 1 static class Z\$Erased
|
||||
// 0 public static class Z\$Erased
|
||||
|
||||
// 1 public final class FooBar extends FooBar\$Erased implements IFoo IBar
|
||||
// 1 static class FooBar\$Erased
|
||||
// 0 public static class FooBar\$Erased
|
||||
Reference in New Issue
Block a user