Create from Usage: Place extension properties after the usage and generate stub getter

#KT-11795 Fixed
This commit is contained in:
Alexey Sedunov
2016-08-18 16:10:17 +03:00
parent 99ba340236
commit c2b38cfa41
23 changed files with 92 additions and 58 deletions
@@ -1,5 +1,4 @@
// "Create extension property 'A.foo'" "true"
// ERROR: Property must be initialized
class A(val n: Int)
class B {
@@ -1,9 +1,11 @@
// "Create extension property 'A.foo'" "true"
// ERROR: Property must be initialized
class A(val n: Int)
private val A.foo: Boolean
class B {
val A.test: Boolean get() = foo
}
}
private val A.foo: Boolean
get() {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
@@ -1,5 +1,4 @@
// "Create extension property 'A.foo'" "true"
// ERROR: Property must be initialized
class A(val n: Int)
class B {
@@ -1,13 +1,17 @@
// "Create extension property 'A.foo'" "true"
// ERROR: Property must be initialized
class A(val n: Int)
private var A.foo: Boolean
class B {
var A.test: Boolean
get() = foo
set(v: Boolean) {
foo = v
}
}
}
private var A.foo: Boolean
get() {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
set() {
}