Create from Usage: Place extension properties after the usage and generate stub getter
#KT-11795 Fixed
This commit is contained in:
-1
@@ -1,5 +1,4 @@
|
||||
// "Create extension property 'A.foo'" "true"
|
||||
// ERROR: Property must be initialized
|
||||
class A(val n: Int)
|
||||
|
||||
class B {
|
||||
|
||||
+6
-4
@@ -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
@@ -1,5 +1,4 @@
|
||||
// "Create extension property 'A.foo'" "true"
|
||||
// ERROR: Property must be initialized
|
||||
class A(val n: Int)
|
||||
|
||||
class B {
|
||||
|
||||
+8
-4
@@ -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() {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user