Introduce KProperty{0,1,2}.getDelegate

#KT-8384 In Progress
This commit is contained in:
Alexander Udalov
2016-12-22 18:30:38 +03:00
parent f1cd2ee6fd
commit 78f2515e95
47 changed files with 1398 additions and 0 deletions
@@ -0,0 +1,22 @@
// IGNORE_BACKEND: JS
// No kotlin-reflect.jar in this test
// WITH_RUNTIME
import kotlin.reflect.KProperty
object Delegate {
operator fun getValue(instance: Any?, property: KProperty<*>) = ""
}
val foo: String by Delegate
fun box(): String {
try {
::foo.getDelegate()
return "Fail: error should have been thrown"
}
catch (e: KotlinReflectionNotSupportedError) {
return "OK"
}
}
@@ -0,0 +1,21 @@
// IGNORE_BACKEND: JS
// WITH_REFLECT
import kotlin.reflect.KProperty
import kotlin.reflect.jvm.isAccessible
import kotlin.test.*
object Delegate {
operator fun getValue(instance: Any?, property: KProperty<*>) = true
}
class Foo {
val isOK: Boolean by Delegate
}
fun box(): String {
val foo = Foo()
assertEquals(Delegate, Foo::isOK.apply { isAccessible = true }.getDelegate(foo))
assertEquals(Delegate, foo::isOK.apply { isAccessible = true }.getDelegate())
return if (foo.isOK) "OK" else "Fail"
}
@@ -0,0 +1,26 @@
// IGNORE_BACKEND: JS
// WITH_REFLECT
import kotlin.reflect.KProperty
import kotlin.reflect.jvm.isAccessible
import kotlin.test.*
object Delegate {
var storage = ""
operator fun getValue(instance: Any?, property: KProperty<*>) = storage
operator fun setValue(instance: Any?, property: KProperty<*>, value: String) { storage = value }
}
class Foo
var Foo.result: String by Delegate
fun box(): String {
val foo = Foo()
foo.result = "Fail"
val d = (foo::result).apply { isAccessible = true }.getDelegate() as Delegate
foo.result = "OK"
assertEquals(d, (foo::result).apply { isAccessible = true }.getDelegate())
assertEquals(d, (Foo()::result).apply { isAccessible = true }.getDelegate())
return d.getValue(foo, Foo::result)
}
@@ -0,0 +1,26 @@
// IGNORE_BACKEND: JS
// WITH_REFLECT
import kotlin.reflect.KProperty
import kotlin.reflect.jvm.isAccessible
import kotlin.test.*
object Delegate {
var storage = ""
operator fun getValue(instance: Any?, property: KProperty<*>) = storage
operator fun setValue(instance: Any?, property: KProperty<*>, value: String) { storage = value }
}
class Foo {
var result: String by Delegate
}
fun box(): String {
val foo = Foo()
foo.result = "Fail"
val d = (foo::result).apply { isAccessible = true }.getDelegate() as Delegate
foo.result = "OK"
assertEquals(d, (foo::result).apply { isAccessible = true }.getDelegate())
assertEquals(d, (Foo()::result).apply { isAccessible = true }.getDelegate())
return d.getValue(foo, Foo::result)
}
@@ -0,0 +1,25 @@
// IGNORE_BACKEND: JS
// WITH_REFLECT
import kotlin.reflect.KProperty
import kotlin.reflect.jvm.isAccessible
import kotlin.test.*
object Delegate {
var storage = ""
operator fun getValue(instance: Any?, property: KProperty<*>) = storage
operator fun setValue(instance: Any?, property: KProperty<*>, value: String) { storage = value }
}
class Foo
var Foo.result: String by Delegate
fun box(): String {
val foo = Foo()
foo.result = "Fail"
val d = Foo::result.apply { isAccessible = true }.getDelegate(foo) as Delegate
foo.result = "OK"
assertEquals(d, Foo::result.apply { isAccessible = true }.getDelegate(foo))
return d.getValue(foo, Foo::result)
}
@@ -0,0 +1,25 @@
// IGNORE_BACKEND: JS
// WITH_REFLECT
import kotlin.reflect.KProperty
import kotlin.reflect.jvm.isAccessible
import kotlin.test.*
object Delegate {
operator fun getValue(instance: Any?, property: KProperty<*>) = "OK"
}
open class Base {
val x: String by Delegate
}
class Derived : Base()
fun box(): String {
val d = Derived()
assertEquals(
(Base::x).apply { isAccessible = true }.getDelegate(d),
(Derived::x).apply { isAccessible = true }.getDelegate(d)
)
return d.x
}
@@ -0,0 +1,32 @@
// IGNORE_BACKEND: JS
// WITH_REFLECT
import kotlin.reflect.KProperty
import kotlin.reflect.KProperty0
import kotlin.reflect.jvm.isAccessible
import kotlin.test.*
var ref: KProperty<*>? = null
class Delegate {
var storage = ""
operator fun provideDelegate(instance: Any?, property: KProperty<*>): Delegate {
ref = property
return this
}
operator fun getValue(instance: Any?, property: KProperty<*>): String = storage
operator fun setValue(instance: Any?, property: KProperty<*>, value: String) { storage = value }
}
var result: String by Delegate()
fun box(): String {
result
val prop = ref as KProperty0<*>
result = "Fail"
val d = prop.apply { isAccessible = true }.getDelegate() as Delegate
result = "OK"
assertEquals(d, prop.apply { isAccessible = true }.getDelegate())
return result
}
@@ -0,0 +1,29 @@
// IGNORE_BACKEND: JS
// WITH_REFLECT
import kotlin.reflect.*
import kotlin.reflect.jvm.isAccessible
import kotlin.test.*
object Delegate {
var storage = ""
operator fun getValue(instance: Any?, property: KProperty<*>) = storage
operator fun setValue(instance: Any?, property: KProperty<*>, value: String) { storage = value }
}
class Bar
class Foo {
var Bar.result: String by Delegate
}
fun box(): String {
val foo = Foo()
val bar = Bar()
with(foo) { bar.result = "Fail" }
val prop = Foo::class.members.single { it.name == "result" } as KMutableProperty2<Foo, Bar, String>
val d = prop.apply { isAccessible = true }.getDelegate(foo, bar) as Delegate
with(foo) { bar.result = "OK" }
assertEquals(d, prop.apply { isAccessible = true }.getDelegate(foo, bar))
return d.getValue(foo, prop)
}
@@ -0,0 +1,25 @@
// IGNORE_BACKEND: JS
// WITH_REFLECT
import kotlin.reflect.KProperty
import kotlin.reflect.jvm.isAccessible
import kotlin.test.*
object Delegate {
var storage = ""
operator fun getValue(instance: Any?, property: KProperty<*>) = storage
operator fun setValue(instance: Any?, property: KProperty<*>, value: String) { storage = value }
}
class Foo {
var result: String by Delegate
}
fun box(): String {
val foo = Foo()
foo.result = "Fail"
val d = (Foo::result).apply { isAccessible = true }.getDelegate(foo) as Delegate
foo.result = "OK"
assertEquals(d, (Foo::result).apply { isAccessible = true }.getDelegate(foo))
return d.getValue(foo, Foo::result)
}
@@ -0,0 +1,26 @@
// IGNORE_BACKEND: JS
// WITH_REFLECT
import kotlin.reflect.KProperty
import kotlin.reflect.jvm.isAccessible
import kotlin.test.*
class Delegate(val value: String) {
operator fun getValue(instance: Any?, property: KProperty<*>) = value
}
class Foo {
val x: String by Delegate("class")
companion object {
val x: String by Delegate("companion")
}
}
fun box(): String {
val foo = Foo()
assertEquals("class", ((foo::x).apply { isAccessible = true }.getDelegate() as Delegate).value)
assertEquals("class", ((Foo::x).apply { isAccessible = true }.getDelegate(foo) as Delegate).value)
assertEquals("companion", ((Foo.Companion::x).apply { isAccessible = true }.getDelegate() as Delegate).value)
return "OK"
}
@@ -0,0 +1,42 @@
// IGNORE_BACKEND: JS
// WITH_REFLECT
import kotlin.reflect.*
import kotlin.reflect.full.extensionReceiverParameter
import kotlin.reflect.jvm.isAccessible
import kotlin.test.*
class Delegate(val value: String) {
operator fun getValue(instance: Any?, property: KProperty<*>) = value
}
class Foo
val Foo.bar: String by Delegate("Foo")
val String.bar: String by Delegate("String")
val Unit.bar: String by Delegate("Unit")
class MemberExtensions {
val Foo?.bar: String by Delegate("Foo")
val String?.bar: String by Delegate("String")
val Unit?.bar: String by Delegate("Unit")
}
fun box(): String {
val foo = Foo()
assertEquals("Foo", ((foo::bar).apply { isAccessible = true }.getDelegate() as Delegate).value)
assertEquals("Foo", ((Foo::bar).apply { isAccessible = true }.getDelegate(foo) as Delegate).value)
assertEquals("String", ((""::bar).apply { isAccessible = true }.getDelegate() as Delegate).value)
assertEquals("String", ((String::bar).apply { isAccessible = true }.getDelegate("") as Delegate).value)
assertEquals("Unit", ((Unit::bar).apply { isAccessible = true }.getDelegate() as Delegate).value)
val me = MemberExtensions::class.members.filter { it.name == "bar" } as List<KProperty2<MemberExtensions, Any?, String>>
assertEquals(listOf("Foo", "String", "Unit"), me.sortedBy {
it.extensionReceiverParameter!!.type.toString()
}.map {
(it.apply { isAccessible = true }.getDelegate(MemberExtensions(), null) as Delegate).value
})
return "OK"
}
@@ -0,0 +1,44 @@
// IGNORE_BACKEND: JS
// WITH_REFLECT
import kotlin.reflect.KProperty
import kotlin.reflect.KProperty2
import kotlin.reflect.full.IllegalPropertyDelegateAccessException
import kotlin.test.*
object Delegate {
operator fun getValue(instance: Any?, property: KProperty<*>) = true
}
val topLevel: Boolean by Delegate
val String.extension: Boolean by Delegate
class Foo {
val member: Boolean by Delegate
val String.memberExtension: Boolean by Delegate
}
inline fun check(block: () -> Unit) {
try {
block()
throw AssertionError("No IllegalPropertyDelegateAccessException has been thrown")
} catch (e: IllegalPropertyDelegateAccessException) {
// OK
}
}
fun box(): String {
check { ::topLevel.getDelegate() }
check { String::extension.getDelegate("") }
check { ""::extension.getDelegate() }
val foo = Foo()
check { Foo::member.getDelegate(foo) }
check { foo::member.getDelegate() }
val me = Foo::class.members.single { it.name == "memberExtension" } as KProperty2<Foo, String, Boolean>
check { me.getDelegate(foo, "") }
return "OK"
}
@@ -0,0 +1,29 @@
// IGNORE_BACKEND: JS
// WITH_REFLECT
import kotlin.reflect.KProperty2
import kotlin.reflect.jvm.isAccessible
import kotlin.test.*
val topLevel: Boolean = true
val String.extension: Boolean get() = true
class Foo {
val member: Boolean = true
val String.memberExtension: Boolean get() = true
}
fun box(): String {
assertNull(::topLevel.apply { isAccessible = true }.getDelegate())
assertNull(String::extension.apply { isAccessible = true }.getDelegate(""))
assertNull(""::extension.apply { isAccessible = true }.getDelegate())
assertNull(Foo::member.apply { isAccessible = true }.getDelegate(Foo()))
assertNull(Foo()::member.apply { isAccessible = true }.getDelegate())
val me = Foo::class.members.single { it.name == "memberExtension" } as KProperty2<Foo, String, Boolean>
assertNull(me.apply { isAccessible = true }.getDelegate(Foo(), ""))
return "OK"
}
@@ -0,0 +1,37 @@
// IGNORE_BACKEND: JS
// WITH_REFLECT
import kotlin.reflect.KProperty
import kotlin.reflect.jvm.isAccessible
import kotlin.test.*
class Delegate(val value: String) {
operator fun getValue(instance: Any?, property: KProperty<*>) = value
}
open class Base {
open val x: String by Delegate("Base")
}
class Derived : Base() {
override val x: String by Delegate("Derived")
}
fun check(expected: String, delegate: Any?) {
if (delegate == null) throw AssertionError("getDelegate returned null")
assertEquals(expected, (delegate as Delegate).value)
}
fun box(): String {
val base = Base()
val derived = Derived()
check("Base", (Base::x).apply { isAccessible = true }.getDelegate(base))
check("Base", (base::x).apply { isAccessible = true }.getDelegate())
check("Derived", (Derived::x).apply { isAccessible = true }.getDelegate(derived))
check("Derived", (derived::x).apply { isAccessible = true }.getDelegate())
check("Base", (Base::x).apply { isAccessible = true }.getDelegate(derived))
return "OK"
}
@@ -0,0 +1,23 @@
// IGNORE_BACKEND: JS
// WITH_REFLECT
import kotlin.reflect.KProperty
import kotlin.reflect.jvm.isAccessible
import kotlin.test.*
object Delegate {
var storage = ""
operator fun getValue(instance: Any?, property: KProperty<*>) = storage
operator fun setValue(instance: Any?, property: KProperty<*>, value: String) { storage = value }
}
var result: String by Delegate
fun box(): String {
result = "Fail"
val p = (::result).apply { isAccessible = true }
val d = p.getDelegate() as Delegate
result = "OK"
assertEquals(d, (::result).apply { isAccessible = true }.getDelegate())
return d.getValue(null, p)
}
@@ -0,0 +1,14 @@
@kotlin.Metadata
public final class Delegate {
public final static field INSTANCE: Delegate
private method <init>(): void
public final @org.jetbrains.annotations.NotNull method getValue(@org.jetbrains.annotations.Nullable p0: java.lang.Object, @org.jetbrains.annotations.NotNull p1: kotlin.reflect.KProperty): java.lang.String
}
@kotlin.Metadata
public final class GetDelegateWithoutReflectionKt {
private synthetic final static field $$delegatedProperties: kotlin.reflect.KProperty[]
private final static @org.jetbrains.annotations.NotNull field foo$delegate: Delegate
public final static @org.jetbrains.annotations.NotNull method box(): java.lang.String
public final static @org.jetbrains.annotations.NotNull method getFoo(): java.lang.String
}
@@ -0,0 +1,19 @@
@kotlin.Metadata
public final class BooleanPropertyNameStartsWithIsKt {
public final static @org.jetbrains.annotations.NotNull method box(): java.lang.String
}
@kotlin.Metadata
public final class Delegate {
public final static field INSTANCE: Delegate
private method <init>(): void
public final method getValue(@org.jetbrains.annotations.Nullable p0: java.lang.Object, @org.jetbrains.annotations.NotNull p1: kotlin.reflect.KProperty): boolean
}
@kotlin.Metadata
public final class Foo {
private synthetic final static field $$delegatedProperties: kotlin.reflect.KProperty[]
private final @org.jetbrains.annotations.NotNull field isOK$delegate: Delegate
public method <init>(): void
public final method isOK(): boolean
}
@@ -0,0 +1,24 @@
@kotlin.Metadata
public final class BoundExtensionPropertyKt {
private synthetic final static field $$delegatedProperties: kotlin.reflect.KProperty[]
private final static @org.jetbrains.annotations.NotNull field result$delegate: Delegate
public final static @org.jetbrains.annotations.NotNull method box(): java.lang.String
public final static @org.jetbrains.annotations.NotNull method getResult(@org.jetbrains.annotations.NotNull p0: Foo): java.lang.String
public final static method setResult(@org.jetbrains.annotations.NotNull p0: Foo, @org.jetbrains.annotations.NotNull p1: java.lang.String): void
}
@kotlin.Metadata
public final class Delegate {
public final static field INSTANCE: Delegate
private static @org.jetbrains.annotations.NotNull field storage: java.lang.String
private method <init>(): void
public final @org.jetbrains.annotations.NotNull method getStorage(): java.lang.String
public final @org.jetbrains.annotations.NotNull method getValue(@org.jetbrains.annotations.Nullable p0: java.lang.Object, @org.jetbrains.annotations.NotNull p1: kotlin.reflect.KProperty): java.lang.String
public final method setStorage(@org.jetbrains.annotations.NotNull p0: java.lang.String): void
public final method setValue(@org.jetbrains.annotations.Nullable p0: java.lang.Object, @org.jetbrains.annotations.NotNull p1: kotlin.reflect.KProperty, @org.jetbrains.annotations.NotNull p2: java.lang.String): void
}
@kotlin.Metadata
public final class Foo {
public method <init>(): void
}
@@ -0,0 +1,24 @@
@kotlin.Metadata
public final class BoundMemberPropertyKt {
public final static @org.jetbrains.annotations.NotNull method box(): java.lang.String
}
@kotlin.Metadata
public final class Delegate {
public final static field INSTANCE: Delegate
private static @org.jetbrains.annotations.NotNull field storage: java.lang.String
private method <init>(): void
public final @org.jetbrains.annotations.NotNull method getStorage(): java.lang.String
public final @org.jetbrains.annotations.NotNull method getValue(@org.jetbrains.annotations.Nullable p0: java.lang.Object, @org.jetbrains.annotations.NotNull p1: kotlin.reflect.KProperty): java.lang.String
public final method setStorage(@org.jetbrains.annotations.NotNull p0: java.lang.String): void
public final method setValue(@org.jetbrains.annotations.Nullable p0: java.lang.Object, @org.jetbrains.annotations.NotNull p1: kotlin.reflect.KProperty, @org.jetbrains.annotations.NotNull p2: java.lang.String): void
}
@kotlin.Metadata
public final class Foo {
private synthetic final static field $$delegatedProperties: kotlin.reflect.KProperty[]
private final @org.jetbrains.annotations.NotNull field result$delegate: Delegate
public method <init>(): void
public final @org.jetbrains.annotations.NotNull method getResult(): java.lang.String
public final method setResult(@org.jetbrains.annotations.NotNull p0: java.lang.String): void
}
@@ -0,0 +1,24 @@
@kotlin.Metadata
public final class Delegate {
public final static field INSTANCE: Delegate
private static @org.jetbrains.annotations.NotNull field storage: java.lang.String
private method <init>(): void
public final @org.jetbrains.annotations.NotNull method getStorage(): java.lang.String
public final @org.jetbrains.annotations.NotNull method getValue(@org.jetbrains.annotations.Nullable p0: java.lang.Object, @org.jetbrains.annotations.NotNull p1: kotlin.reflect.KProperty): java.lang.String
public final method setStorage(@org.jetbrains.annotations.NotNull p0: java.lang.String): void
public final method setValue(@org.jetbrains.annotations.Nullable p0: java.lang.Object, @org.jetbrains.annotations.NotNull p1: kotlin.reflect.KProperty, @org.jetbrains.annotations.NotNull p2: java.lang.String): void
}
@kotlin.Metadata
public final class ExtensionPropertyKt {
private synthetic final static field $$delegatedProperties: kotlin.reflect.KProperty[]
private final static @org.jetbrains.annotations.NotNull field result$delegate: Delegate
public final static @org.jetbrains.annotations.NotNull method box(): java.lang.String
public final static @org.jetbrains.annotations.NotNull method getResult(@org.jetbrains.annotations.NotNull p0: Foo): java.lang.String
public final static method setResult(@org.jetbrains.annotations.NotNull p0: Foo, @org.jetbrains.annotations.NotNull p1: java.lang.String): void
}
@kotlin.Metadata
public final class Foo {
public method <init>(): void
}
@@ -0,0 +1,24 @@
@kotlin.Metadata
public class Base {
private synthetic final static field $$delegatedProperties: kotlin.reflect.KProperty[]
private final @org.jetbrains.annotations.NotNull field x$delegate: Delegate
public method <init>(): void
public final @org.jetbrains.annotations.NotNull method getX(): java.lang.String
}
@kotlin.Metadata
public final class Delegate {
public final static field INSTANCE: Delegate
private method <init>(): void
public final @org.jetbrains.annotations.NotNull method getValue(@org.jetbrains.annotations.Nullable p0: java.lang.Object, @org.jetbrains.annotations.NotNull p1: kotlin.reflect.KProperty): java.lang.String
}
@kotlin.Metadata
public final class Derived {
public method <init>(): void
}
@kotlin.Metadata
public final class FakeOverrideKt {
public final static @org.jetbrains.annotations.NotNull method box(): java.lang.String
}
@@ -0,0 +1,22 @@
@kotlin.Metadata
public final class Delegate {
private @org.jetbrains.annotations.NotNull field storage: java.lang.String
public method <init>(): void
public final @org.jetbrains.annotations.NotNull method getStorage(): java.lang.String
public final @org.jetbrains.annotations.NotNull method getValue(@org.jetbrains.annotations.Nullable p0: java.lang.Object, @org.jetbrains.annotations.NotNull p1: kotlin.reflect.KProperty): java.lang.String
public final @org.jetbrains.annotations.NotNull method provideDelegate(@org.jetbrains.annotations.Nullable p0: java.lang.Object, @org.jetbrains.annotations.NotNull p1: kotlin.reflect.KProperty): Delegate
public final method setStorage(@org.jetbrains.annotations.NotNull p0: java.lang.String): void
public final method setValue(@org.jetbrains.annotations.Nullable p0: java.lang.Object, @org.jetbrains.annotations.NotNull p1: kotlin.reflect.KProperty, @org.jetbrains.annotations.NotNull p2: java.lang.String): void
}
@kotlin.Metadata
public final class KPropertyForDelegatedPropertyKt {
private synthetic final static field $$delegatedProperties: kotlin.reflect.KProperty[]
private static @org.jetbrains.annotations.Nullable field ref: kotlin.reflect.KProperty
private final static @org.jetbrains.annotations.NotNull field result$delegate: Delegate
public final static @org.jetbrains.annotations.NotNull method box(): java.lang.String
public final static @org.jetbrains.annotations.Nullable method getRef(): kotlin.reflect.KProperty
public final static @org.jetbrains.annotations.NotNull method getResult(): java.lang.String
public final static method setRef(@org.jetbrains.annotations.Nullable p0: kotlin.reflect.KProperty): void
public final static method setResult(@org.jetbrains.annotations.NotNull p0: java.lang.String): void
}
@@ -0,0 +1,29 @@
@kotlin.Metadata
public final class Bar {
public method <init>(): void
}
@kotlin.Metadata
public final class Delegate {
public final static field INSTANCE: Delegate
private static @org.jetbrains.annotations.NotNull field storage: java.lang.String
private method <init>(): void
public final @org.jetbrains.annotations.NotNull method getStorage(): java.lang.String
public final @org.jetbrains.annotations.NotNull method getValue(@org.jetbrains.annotations.Nullable p0: java.lang.Object, @org.jetbrains.annotations.NotNull p1: kotlin.reflect.KProperty): java.lang.String
public final method setStorage(@org.jetbrains.annotations.NotNull p0: java.lang.String): void
public final method setValue(@org.jetbrains.annotations.Nullable p0: java.lang.Object, @org.jetbrains.annotations.NotNull p1: kotlin.reflect.KProperty, @org.jetbrains.annotations.NotNull p2: java.lang.String): void
}
@kotlin.Metadata
public final class Foo {
private synthetic final static field $$delegatedProperties: kotlin.reflect.KProperty[]
private final @org.jetbrains.annotations.NotNull field result$delegate: Delegate
public method <init>(): void
public final @org.jetbrains.annotations.NotNull method getResult(@org.jetbrains.annotations.NotNull p0: Bar): java.lang.String
public final method setResult(@org.jetbrains.annotations.NotNull p0: Bar, @org.jetbrains.annotations.NotNull p1: java.lang.String): void
}
@kotlin.Metadata
public final class MemberExtensionPropertyKt {
public final static @org.jetbrains.annotations.NotNull method box(): java.lang.String
}
@@ -0,0 +1,24 @@
@kotlin.Metadata
public final class Delegate {
public final static field INSTANCE: Delegate
private static @org.jetbrains.annotations.NotNull field storage: java.lang.String
private method <init>(): void
public final @org.jetbrains.annotations.NotNull method getStorage(): java.lang.String
public final @org.jetbrains.annotations.NotNull method getValue(@org.jetbrains.annotations.Nullable p0: java.lang.Object, @org.jetbrains.annotations.NotNull p1: kotlin.reflect.KProperty): java.lang.String
public final method setStorage(@org.jetbrains.annotations.NotNull p0: java.lang.String): void
public final method setValue(@org.jetbrains.annotations.Nullable p0: java.lang.Object, @org.jetbrains.annotations.NotNull p1: kotlin.reflect.KProperty, @org.jetbrains.annotations.NotNull p2: java.lang.String): void
}
@kotlin.Metadata
public final class Foo {
private synthetic final static field $$delegatedProperties: kotlin.reflect.KProperty[]
private final @org.jetbrains.annotations.NotNull field result$delegate: Delegate
public method <init>(): void
public final @org.jetbrains.annotations.NotNull method getResult(): java.lang.String
public final method setResult(@org.jetbrains.annotations.NotNull p0: java.lang.String): void
}
@kotlin.Metadata
public final class MemberPropertyKt {
public final static @org.jetbrains.annotations.NotNull method box(): java.lang.String
}
@@ -0,0 +1,31 @@
@kotlin.Metadata
public final class Delegate {
private final @org.jetbrains.annotations.NotNull field value: java.lang.String
public method <init>(@org.jetbrains.annotations.NotNull p0: java.lang.String): void
public final @org.jetbrains.annotations.NotNull method getValue(): java.lang.String
public final @org.jetbrains.annotations.NotNull method getValue(@org.jetbrains.annotations.Nullable p0: java.lang.Object, @org.jetbrains.annotations.NotNull p1: kotlin.reflect.KProperty): java.lang.String
}
@kotlin.Metadata
public final class Foo {
private synthetic final static field $$delegatedProperties: kotlin.reflect.KProperty[]
public final static field Companion: Foo.Companion
private final @org.jetbrains.annotations.NotNull field x$delegate$1: Delegate
private final static @org.jetbrains.annotations.NotNull field x$delegate: Delegate
inner class Foo/Companion
public method <init>(): void
public final @org.jetbrains.annotations.NotNull method getX(): java.lang.String
}
@kotlin.Metadata
public final static class Foo/Companion {
private synthetic final static field $$delegatedProperties: kotlin.reflect.KProperty[]
inner class Foo/Companion
private method <init>(): void
public final @org.jetbrains.annotations.NotNull method getX(): java.lang.String
}
@kotlin.Metadata
public final class NameClashClassAndCompanionKt {
public final static @org.jetbrains.annotations.NotNull method box(): java.lang.String
}
@@ -0,0 +1,36 @@
@kotlin.Metadata
public final class Delegate {
private final @org.jetbrains.annotations.NotNull field value: java.lang.String
public method <init>(@org.jetbrains.annotations.NotNull p0: java.lang.String): void
public final @org.jetbrains.annotations.NotNull method getValue(): java.lang.String
public final @org.jetbrains.annotations.NotNull method getValue(@org.jetbrains.annotations.Nullable p0: java.lang.Object, @org.jetbrains.annotations.NotNull p1: kotlin.reflect.KProperty): java.lang.String
}
@kotlin.Metadata
public final class Foo {
public method <init>(): void
}
@kotlin.Metadata
public final class MemberExtensions {
private synthetic final static field $$delegatedProperties: kotlin.reflect.KProperty[]
private final @org.jetbrains.annotations.NotNull field bar$delegate$1: Delegate
private final @org.jetbrains.annotations.NotNull field bar$delegate$2: Delegate
private final @org.jetbrains.annotations.NotNull field bar$delegate: Delegate
public method <init>(): void
public final @org.jetbrains.annotations.NotNull method getBar(@org.jetbrains.annotations.Nullable p0: Foo): java.lang.String
public final @org.jetbrains.annotations.NotNull method getBar(@org.jetbrains.annotations.Nullable p0: java.lang.String): java.lang.String
public final @org.jetbrains.annotations.NotNull method getBar(@org.jetbrains.annotations.Nullable p0: kotlin.Unit): java.lang.String
}
@kotlin.Metadata
public final class NameClashExtensionPropertiesKt {
private synthetic final static field $$delegatedProperties: kotlin.reflect.KProperty[]
private final static @org.jetbrains.annotations.NotNull field bar$delegate$1: Delegate
private final static @org.jetbrains.annotations.NotNull field bar$delegate$2: Delegate
private final static @org.jetbrains.annotations.NotNull field bar$delegate: Delegate
public final static @org.jetbrains.annotations.NotNull method box(): java.lang.String
public final static @org.jetbrains.annotations.NotNull method getBar(@org.jetbrains.annotations.NotNull p0: Foo): java.lang.String
public final static @org.jetbrains.annotations.NotNull method getBar(@org.jetbrains.annotations.NotNull p0: java.lang.String): java.lang.String
public final static @org.jetbrains.annotations.NotNull method getBar(@org.jetbrains.annotations.NotNull p0: kotlin.Unit): java.lang.String
}
@@ -0,0 +1,27 @@
@kotlin.Metadata
public final class Delegate {
public final static field INSTANCE: Delegate
private method <init>(): void
public final method getValue(@org.jetbrains.annotations.Nullable p0: java.lang.Object, @org.jetbrains.annotations.NotNull p1: kotlin.reflect.KProperty): boolean
}
@kotlin.Metadata
public final class Foo {
private synthetic final static field $$delegatedProperties: kotlin.reflect.KProperty[]
private final @org.jetbrains.annotations.NotNull field member$delegate: Delegate
private final @org.jetbrains.annotations.NotNull field memberExtension$delegate: Delegate
public method <init>(): void
public final method getMember(): boolean
public final method getMemberExtension(@org.jetbrains.annotations.NotNull p0: java.lang.String): boolean
}
@kotlin.Metadata
public final class NoSetAccessibleTrueKt {
private synthetic final static field $$delegatedProperties: kotlin.reflect.KProperty[]
private final static @org.jetbrains.annotations.NotNull field extension$delegate: Delegate
private final static @org.jetbrains.annotations.NotNull field topLevel$delegate: Delegate
public final static @org.jetbrains.annotations.NotNull method box(): java.lang.String
public final static method check(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): void
public final static method getExtension(@org.jetbrains.annotations.NotNull p0: java.lang.String): boolean
public final static method getTopLevel(): boolean
}
@@ -0,0 +1,15 @@
@kotlin.Metadata
public final class Foo {
private final field member: boolean
public method <init>(): void
public final method getMember(): boolean
public final method getMemberExtension(@org.jetbrains.annotations.NotNull p0: java.lang.String): boolean
}
@kotlin.Metadata
public final class NotDelegatedPropertyKt {
private final static field topLevel: boolean
public final static @org.jetbrains.annotations.NotNull method box(): java.lang.String
public final static method getExtension(@org.jetbrains.annotations.NotNull p0: java.lang.String): boolean
public final static method getTopLevel(): boolean
}
@@ -0,0 +1,29 @@
@kotlin.Metadata
public class Base {
private synthetic final static field $$delegatedProperties: kotlin.reflect.KProperty[]
private final @org.jetbrains.annotations.NotNull field x$delegate: Delegate
public method <init>(): void
public @org.jetbrains.annotations.NotNull method getX(): java.lang.String
}
@kotlin.Metadata
public final class Delegate {
private final @org.jetbrains.annotations.NotNull field value: java.lang.String
public method <init>(@org.jetbrains.annotations.NotNull p0: java.lang.String): void
public final @org.jetbrains.annotations.NotNull method getValue(): java.lang.String
public final @org.jetbrains.annotations.NotNull method getValue(@org.jetbrains.annotations.Nullable p0: java.lang.Object, @org.jetbrains.annotations.NotNull p1: kotlin.reflect.KProperty): java.lang.String
}
@kotlin.Metadata
public final class Derived {
private synthetic final static field $$delegatedProperties: kotlin.reflect.KProperty[]
private final @org.jetbrains.annotations.NotNull field x$delegate: Delegate
public method <init>(): void
public @org.jetbrains.annotations.NotNull method getX(): java.lang.String
}
@kotlin.Metadata
public final class OverrideDelegatedByDelegatedKt {
public final static @org.jetbrains.annotations.NotNull method box(): java.lang.String
public final static method check(@org.jetbrains.annotations.NotNull p0: java.lang.String, @org.jetbrains.annotations.Nullable p1: java.lang.Object): void
}
@@ -0,0 +1,19 @@
@kotlin.Metadata
public final class Delegate {
public final static field INSTANCE: Delegate
private static @org.jetbrains.annotations.NotNull field storage: java.lang.String
private method <init>(): void
public final @org.jetbrains.annotations.NotNull method getStorage(): java.lang.String
public final @org.jetbrains.annotations.NotNull method getValue(@org.jetbrains.annotations.Nullable p0: java.lang.Object, @org.jetbrains.annotations.NotNull p1: kotlin.reflect.KProperty): java.lang.String
public final method setStorage(@org.jetbrains.annotations.NotNull p0: java.lang.String): void
public final method setValue(@org.jetbrains.annotations.Nullable p0: java.lang.Object, @org.jetbrains.annotations.NotNull p1: kotlin.reflect.KProperty, @org.jetbrains.annotations.NotNull p2: java.lang.String): void
}
@kotlin.Metadata
public final class TopLevelPropertyKt {
private synthetic final static field $$delegatedProperties: kotlin.reflect.KProperty[]
private final static @org.jetbrains.annotations.NotNull field result$delegate: Delegate
public final static @org.jetbrains.annotations.NotNull method box(): java.lang.String
public final static @org.jetbrains.annotations.NotNull method getResult(): java.lang.String
public final static method setResult(@org.jetbrains.annotations.NotNull p0: java.lang.String): void
}