Insert KProperty<*> when creating property delegate methods in IDE

This commit is contained in:
Alexander Udalov
2015-10-13 13:00:51 +03:00
parent ec1b4776fe
commit a6846b3967
11 changed files with 49 additions and 31 deletions
@@ -1,6 +1,8 @@
import kotlin.reflect.KProperty
// "Create member function 'getValue'" "true"
class F {
fun getValue(x: X, propertyMetadata: PropertyMetadata): Int {
fun getValue(x: X, property: KProperty<*>): Int {
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
@@ -1,10 +1,12 @@
import kotlin.reflect.KProperty
// "Create member function 'getValue', function 'setValue'" "true"
class F {
fun getValue(x: X, propertyMetadata: PropertyMetadata): Int {
fun getValue(x: X, property: KProperty<*>): Int {
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
fun setValue(x: X, propertyMetadata: PropertyMetadata, i: Int) {
fun setValue(x: X, property: KProperty<*>, i: Int) {
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
@@ -1,6 +1,8 @@
// "Create member function 'getValue'" "true"
import kotlin.reflect.KProperty
class F {
fun setValue(x: X, propertyMetadata: PropertyMetadata, i: Int) { }
fun setValue(x: X, property: KProperty<*>, i: Int) { }
}
class X {
@@ -1,8 +1,10 @@
// "Create member function 'getValue'" "true"
class F {
fun setValue(x: X, propertyMetadata: PropertyMetadata, i: Int) { }
import kotlin.reflect.KProperty
fun getValue(x: X, propertyMetadata: PropertyMetadata): Int {
class F {
fun setValue(x: X, property: KProperty<*>, i: Int) { }
fun getValue(x: X, property: KProperty<*>): Int {
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}
@@ -1,6 +1,8 @@
// "Create member function 'setValue'" "true"
import kotlin.reflect.KProperty
class F {
fun getValue(x: X, propertyMetadata: PropertyMetadata): Int = 1
fun getValue(x: X, property: KProperty<*>): Int = 1
}
class X {
@@ -1,8 +1,10 @@
// "Create member function 'setValue'" "true"
class F {
fun getValue(x: X, propertyMetadata: PropertyMetadata): Int = 1
import kotlin.reflect.KProperty
fun setValue(x: X, propertyMetadata: PropertyMetadata, i: Int) {
class F {
fun getValue(x: X, property: KProperty<*>): Int = 1
fun setValue(x: X, property: KProperty<*>, i: Int) {
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}