Regenerate inline class tests as 1 arg value classes
This commit is contained in:
committed by
Space
parent
5ac4722be4
commit
ec2e96f3e4
@@ -1,4 +1,6 @@
|
||||
// WITH_STDLIB
|
||||
// WORKS_WHEN_VALUE_CLASS
|
||||
// LANGUAGE: +ValueClasses
|
||||
|
||||
import kotlin.properties.ReadOnlyProperty
|
||||
import kotlin.reflect.KProperty
|
||||
@@ -8,8 +10,7 @@ class Foo {
|
||||
val b by Delegate(0)
|
||||
}
|
||||
|
||||
@Suppress("OPTIONAL_DECLARATION_USAGE_IN_NON_COMMON_SOURCE")
|
||||
@kotlin.jvm.JvmInline
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class Delegate(val ignored: Int): ReadOnlyProperty<Foo, Int> {
|
||||
override fun getValue(thisRef: Foo, property: KProperty<*>): Int {
|
||||
return thisRef.a
|
||||
|
||||
Reference in New Issue
Block a user