Add constructor parameters quickfix reuses existing parameters

This commit is contained in:
Valentin Kipyatkov
2015-05-08 21:24:55 +03:00
parent 0952e9a63a
commit e31f0ed829
6 changed files with 44 additions and 5 deletions
@@ -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)