Initialize Property with Constructor Parameter Quick-Fix: Skip secondary constructors with this-delegation. Use containing class as a Change Signature context
#KT-10818 Fixed
This commit is contained in:
+8
@@ -0,0 +1,8 @@
|
||||
// "Initialize with constructor parameter" "true"
|
||||
open class RGrandAccessor(x: Int) {}
|
||||
|
||||
open class RAccessor : RGrandAccessor {
|
||||
<caret>val f: Int
|
||||
constructor(p: Boolean) : super(1)
|
||||
constructor(p: String) : this(true)
|
||||
}
|
||||
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
// "Initialize with constructor parameter" "true"
|
||||
open class RGrandAccessor(x: Int) {}
|
||||
|
||||
open class RAccessor : RGrandAccessor {
|
||||
<caret>val f: Int
|
||||
constructor(p: Boolean, f: Int) : super(1) {
|
||||
this.f = f
|
||||
}
|
||||
|
||||
constructor(p: String) : this(true, 0)
|
||||
}
|
||||
Reference in New Issue
Block a user