Introduce propertyDelegated method in delegates

This commit is contained in:
Denis Mekhanikov
2014-09-20 17:42:02 +04:00
parent 9e38d207f2
commit c4bfa0edca
35 changed files with 597 additions and 42 deletions
@@ -0,0 +1,16 @@
val a: Int by <!DELEGATE_SPECIAL_FUNCTION_AMBIGUITY!>Delegate()<!>
class Delegate {
fun get(t: Any?, p: PropertyMetadata): Int {
t.equals(p) // to avoid UNUSED_PARAMETER warning
return 1
}
fun propertyDelegated(p: PropertyMetadata) {
p.equals(p)
}
fun propertyDelegated(p: PropertyMetadata, s: String = "") {
p.equals(s)
}
}
@@ -0,0 +1,13 @@
package
internal val a: kotlin.Int
internal final class Delegate {
public constructor Delegate()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
internal final fun get(/*0*/ t: kotlin.Any?, /*1*/ p: kotlin.PropertyMetadata): kotlin.Int
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
internal final fun propertyDelegated(/*0*/ p: kotlin.PropertyMetadata): kotlin.Unit
internal final fun propertyDelegated(/*0*/ p: kotlin.PropertyMetadata, /*1*/ s: kotlin.String = ...): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
@@ -0,0 +1,12 @@
val a: Int by <!DELEGATE_PD_METHOD_NONE_APPLICABLE!>Delegate()<!>
class Delegate {
fun get(t: Any?, p: PropertyMetadata): Int {
t.equals(p) // to avoid UNUSED_PARAMETER warning
return 1
}
fun propertyDelegated<T>(p: PropertyMetadata) {
p.equals(p)
}
}
@@ -0,0 +1,12 @@
package
internal val a: kotlin.Int
internal final class Delegate {
public constructor Delegate()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
internal final fun get(/*0*/ t: kotlin.Any?, /*1*/ p: kotlin.PropertyMetadata): kotlin.Int
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
internal final fun </*0*/ T> propertyDelegated(/*0*/ p: kotlin.PropertyMetadata): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
@@ -0,0 +1,8 @@
val a: Int by Delegate()
class Delegate {
fun get(t: Any?, p: PropertyMetadata): Int {
t.equals(p) // to avoid UNUSED_PARAMETER warning
return 1
}
}
@@ -0,0 +1,11 @@
package
internal val a: kotlin.Int
internal final class Delegate {
public constructor Delegate()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
internal final fun get(/*0*/ t: kotlin.Any?, /*1*/ p: kotlin.PropertyMetadata): kotlin.Int
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
@@ -0,0 +1,12 @@
val a: Int by <!DELEGATE_PD_METHOD_NONE_APPLICABLE!>Delegate()<!>
class Delegate {
fun get(t: Any?, p: PropertyMetadata): Int {
t.equals(p) // to avoid UNUSED_PARAMETER warning
return 1
}
private fun propertyDelegated(p: PropertyMetadata) {
p.equals(p)
}
}
@@ -0,0 +1,12 @@
package
internal val a: kotlin.Int
internal final class Delegate {
public constructor Delegate()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
internal final fun get(/*0*/ t: kotlin.Any?, /*1*/ p: kotlin.PropertyMetadata): kotlin.Int
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
private final fun propertyDelegated(/*0*/ p: kotlin.PropertyMetadata): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
@@ -0,0 +1,22 @@
val a: Int by <!DELEGATE_PD_METHOD_NONE_APPLICABLE!>Delegate()<!>
class Delegate {
fun get(t: Any?, p: PropertyMetadata): Int {
t.equals(p) // to avoid UNUSED_PARAMETER warning
return 1
}
fun propertyDelegated() {}
fun propertyDelegated(a: Int) {
a.equals(a)
}
fun propertyDelegated(a: String) {
a.equals(a)
}
fun propertyDelegated(p: PropertyMetadata, a: Int) {
p.equals(a)
}
}
@@ -0,0 +1,15 @@
package
internal val a: kotlin.Int
internal final class Delegate {
public constructor Delegate()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
internal final fun get(/*0*/ t: kotlin.Any?, /*1*/ p: kotlin.PropertyMetadata): kotlin.Int
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
internal final fun propertyDelegated(): kotlin.Unit
internal final fun propertyDelegated(/*0*/ a: kotlin.Int): kotlin.Unit
internal final fun propertyDelegated(/*0*/ p: kotlin.PropertyMetadata, /*1*/ a: kotlin.Int): kotlin.Unit
internal final fun propertyDelegated(/*0*/ a: kotlin.String): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}