Value classes: treat @JvmInline value classes as inline classes
Report error on value classes without @JvmInline annotation. Do not check for @JvmInline annotation in value classes since it breaks reflection.
This commit is contained in:
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
|
||||
package kotlin
|
||||
|
||||
annotation class JvmInline
|
||||
|
||||
interface IFoo
|
||||
|
||||
object FooImpl : IFoo
|
||||
|
||||
@JvmInline
|
||||
value class Test1(val x: Any) : <!INLINE_CLASS_CANNOT_IMPLEMENT_INTERFACE_BY_DELEGATION!>IFoo by FooImpl<!>
|
||||
|
||||
@JvmInline
|
||||
value class Test2(val x: IFoo) : <!INLINE_CLASS_CANNOT_IMPLEMENT_INTERFACE_BY_DELEGATION!>IFoo by x<!>
|
||||
Reference in New Issue
Block a user