Add constructor parameters quickfix works for multiple constructors

This commit is contained in:
Valentin Kipyatkov
2015-05-08 20:56:59 +03:00
parent 4ac2e29d28
commit 0952e9a63a
18 changed files with 45 additions and 27 deletions
@@ -1,4 +1,4 @@
// "Add constructor parameters and use them" "true"
// "Add constructor parameters from DataInputStream(InputStream!)" "true"
import java.io.DataInputStream
class C : DataInputStream<caret>
@@ -1,4 +1,4 @@
// "Add constructor parameters and use them" "true"
// "Add constructor parameters from DataInputStream(InputStream!)" "true"
import java.io.DataInputStream
import java.io.InputStream
@@ -1,4 +1,4 @@
// "Add constructor parameters and use them" "true"
// "Add constructor parameters from Base(p1: Int, p2: Int)" "true"
open class Base(p1: Int, val p2: Int)
class C(p: Int) : Base<caret>
@@ -1,4 +1,4 @@
// "Add constructor parameters and use them" "true"
// "Add constructor parameters from Base(p1: Int, p2: Int)" "true"
open class Base(p1: Int, val p2: Int)
class C(p: Int, p1: Int, p2: Int) : Base<caret>(p1, p2)
@@ -1,4 +1,4 @@
// "Add constructor parameters and use them" "true"
// "Add constructor parameters from Base(p1: Int, p2: Int)" "true"
open class Base(p1: Int, val p2: Int)
class C : Base<caret>
@@ -1,4 +1,4 @@
// "Add constructor parameters and use them" "true"
// "Add constructor parameters from Base(p1: Int, p2: Int)" "true"
open class Base(p1: Int, val p2: Int)
class C(p1: Int, p2: Int) : Base<caret>(p1, p2)
@@ -1,4 +1,4 @@
// "Add constructor parameters and use them" "true"
// "Add constructor parameters from Base(p1: T, p2: String, p3: Base<T, String>?)" "true"
trait I
open class Base<T1, T2>(p1: T1, p2: T2, p3: Base<T1, T2>?)
@@ -1,4 +1,4 @@
// "Add constructor parameters and use them" "true"
// "Add constructor parameters from Base(p1: T, p2: String, p3: Base<T, String>?)" "true"
trait I
open class Base<T1, T2>(p1: T1, p2: T2, p3: Base<T1, T2>?)
@@ -1,4 +1,4 @@
// "Add constructor parameters and use them" "true"
// "Add constructor parameters from Base(p1: Int, p2: Int)" "true"
open class Base(p1: Int, val p2: Int)
class C private : Base<caret>
@@ -1,4 +1,4 @@
// "Add constructor parameters and use them" "true"
// "Add constructor parameters from Base(p1: Int, p2: Int)" "true"
open class Base(p1: Int, val p2: Int)
class C private (p1: Int, p2: Int) : Base<caret>(p1, p2)
@@ -1,4 +1,4 @@
// "Add constructor parameters and use them" "true"
// "Add constructor parameters from Base(`fun`: Int, `class`: Int)" "true"
open class Base(`fun`: Int, val `class`: Int)
class C : Base<caret>
@@ -1,4 +1,4 @@
// "Add constructor parameters and use them" "true"
// "Add constructor parameters from Base(`fun`: Int, `class`: Int)" "true"
open class Base(`fun`: Int, val `class`: Int)
class C(`fun`: Int, `class`: Int) : Base(`fun`, `class`)
@@ -0,0 +1,5 @@
// "Add constructor parameters from ArrayList((MutableCollection<out String!>..Collection<String!>?))" "true"
// ACTION: Add constructor parameters from ArrayList(Int)
import java.util.ArrayList
class C : ArrayList<String><caret>
@@ -0,0 +1,5 @@
// "Add constructor parameters from ArrayList((MutableCollection<out String!>..Collection<String!>?))" "true"
// ACTION: Add constructor parameters from ArrayList(Int)
import java.util.ArrayList
class C(p0: MutableCollection<out String>) : ArrayList<String><caret>(p0)
@@ -1,4 +1,4 @@
// "Add constructor parameters and use them" "true"
// "Add constructor parameters from Base(s: String)" "true"
open class Base private(p1: Int, val p2: Int) {
private constructor() : this(0, 1)
protected constructor(s: String) : this(s.length(), 1)
@@ -1,4 +1,4 @@
// "Add constructor parameters and use them" "true"
// "Add constructor parameters from Base(s: String)" "true"
open class Base private(p1: Int, val p2: Int) {
private constructor() : this(0, 1)
protected constructor(s: String) : this(s.length(), 1)