Add constructor parameters quickfix reuses existing parameters
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// "Add constructor parameters from Base(p1: Int, p2: Int)" "true"
|
||||
open class Base(p1: Int, val p2: Int)
|
||||
open class Base(p1: Int, private val p2: Int)
|
||||
|
||||
class C(p: Int) : Base<caret>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// "Add constructor parameters from Base(p1: Int, p2: Int)" "true"
|
||||
open class Base(p1: Int, val p2: Int)
|
||||
open class Base(p1: Int, private val p2: Int)
|
||||
|
||||
class C(p: Int, p1: Int, p2: Int) : Base<caret>(p1, p2)
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Add constructor parameters from Base(p1: Int, p2: Int, p3: Any, p4: String, p5: String)" "true"
|
||||
// ERROR: Redeclaration: p4
|
||||
// ERROR: Redeclaration: p4
|
||||
// ERROR: Redeclaration: p4
|
||||
// ERROR: Redeclaration: p4
|
||||
open class Base<T>(p1: Int, private val p2: Int, p3: Any, p4: String, p5: T)
|
||||
|
||||
class C(p: Int, p2: Int, p3: String, p4: Any, p5: String) : Base<String><caret>
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Add constructor parameters from Base(p1: Int, p2: Int, p3: Any, p4: String, p5: String)" "true"
|
||||
// ERROR: Redeclaration: p4
|
||||
// ERROR: Redeclaration: p4
|
||||
// ERROR: Redeclaration: p4
|
||||
// ERROR: Redeclaration: p4
|
||||
open class Base<T>(p1: Int, private val p2: Int, p3: Any, p4: String, p5: T)
|
||||
|
||||
class C(p: Int, p2: Int, p3: String, p4: Any, p5: String, p1: Int, p4: String) : Base<String><caret>(p1, p2, p3, p4, p5)
|
||||
Reference in New Issue
Block a user