Files
kotlin-fork/compiler/testData/diagnostics/tests/valueClasses/valueClassCannotImplementInterfaceByDelegation.fir.kt
T
Ilmir Usmanov 129de76288 Value classes: Generate @JvmInline annotation for inline classes
but not for value classes.
Since inline classes and value classes share the same flag, we use
presence of the annotation to distinguish them.
2020-12-01 23:45:47 +01:00

15 lines
230 B
Kotlin
Vendored

// !LANGUAGE: +InlineClasses
package kotlin.jvm
annotation class JvmInline
interface IFoo
object FooImpl : IFoo
@JvmInline
value class Test1(val x: Any) : IFoo by FooImpl
@JvmInline
value class Test2(val x: IFoo) : IFoo by x