Create from Usage: Support accessors for local delegated properties

#KT-19730 Fixed
This commit is contained in:
Alexey Sedunov
2018-02-27 20:46:36 +03:00
parent 2eddce57ff
commit 96de29dfcb
7 changed files with 71 additions and 10 deletions
@@ -0,0 +1,4 @@
// "Create extension function 'String.getValue'" "true"
fun x(parameters: String) {
val n by <caret>parameters
}
@@ -0,0 +1,10 @@
import kotlin.reflect.KProperty
// "Create extension function 'String.getValue'" "true"
fun x(parameters: String) {
val n by parameters
}
private operator fun String.getValue(nothing: Nothing?, property: KProperty<*>): Any {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
@@ -0,0 +1,4 @@
// "Create extension function 'String.getValue', function 'String.setValue'" "true"
fun x(parameters: String) {
var n by <caret>parameters
}
@@ -0,0 +1,14 @@
import kotlin.reflect.KProperty
// "Create extension function 'String.getValue', function 'String.setValue'" "true"
fun x(parameters: String) {
var n by parameters
}
private operator fun String.setValue(nothing: Nothing?, property: KProperty<*>, any: Any) {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
private operator fun String.getValue(nothing: Nothing?, property: KProperty<*>): Any {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}