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:
Alexey Sedunov
2016-01-27 14:07:17 +03:00
parent fcbb18d876
commit c5b1d205a2
4 changed files with 30 additions and 2 deletions
@@ -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)
}
@@ -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)
}