Change Signature: Support refactoring of primary/secondary constructor by delegation call reference
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
class J {
|
||||
public J(int n, String s) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
open class K: J {
|
||||
constructor(a: Int): super(a, "foo") {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun test() {
|
||||
J(1, "foo")
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
class J {
|
||||
public J(int n) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
open class K: J {
|
||||
constructor(a: Int): <caret>super(a) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun test() {
|
||||
J(1)
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
open class A(s: String) {
|
||||
constructor(a: Int) : this("foo") {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
open class B: A {
|
||||
constructor(a: Int) : super("foo") {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
open class C: A {
|
||||
constructor(a: Int) : super("foo") {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun test() {
|
||||
A("foo")
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
open class A() {
|
||||
constructor(a: Int) : this() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
open class B: A {
|
||||
constructor(a: Int) : <caret>super() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
open class C: A {
|
||||
constructor(a: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun test() {
|
||||
A()
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
open class A(s: String) {
|
||||
constructor(a: Int) : this("foo") {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
open class B: A {
|
||||
constructor(a: Int) : super("foo") {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
open class C: A {
|
||||
constructor(a: Int) : super("foo") {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun test() {
|
||||
A("foo")
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
open class A() {
|
||||
constructor(a: Int) : <caret>this() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
open class B: A {
|
||||
constructor(a: Int) : super() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
open class C: A {
|
||||
constructor(a: Int) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun test() {
|
||||
A()
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
open class A {
|
||||
constructor(a: Int, s: String) {
|
||||
|
||||
}
|
||||
|
||||
constructor(): this(1, "foo") {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
open class B: A {
|
||||
constructor(a: Int): super(a, "foo") {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun test() {
|
||||
A(1, "foo")
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
open class A {
|
||||
constructor(a: Int) {
|
||||
|
||||
}
|
||||
|
||||
constructor(): this(1) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
open class B: A {
|
||||
constructor(a: Int): <caret>super(a) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun test() {
|
||||
A(1)
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
open class A {
|
||||
constructor(a: Int, s: String) {
|
||||
|
||||
}
|
||||
|
||||
constructor(): <caret>this(1, "foo") {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
open class B: A {
|
||||
constructor(a: Int): super(a, "foo") {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun test() {
|
||||
A(1, "foo")
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
open class A {
|
||||
constructor(a: Int) {
|
||||
|
||||
}
|
||||
|
||||
constructor(): <caret>this(1) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
open class B: A {
|
||||
constructor(a: Int): super(a) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
fun test() {
|
||||
A(1)
|
||||
}
|
||||
Reference in New Issue
Block a user