mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-04 12:17:12 +07:00
change signature from usage: new param place: provide reverse based signature transformation when not the same (IDEA-70552)
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
// "Add 'B' as 2nd parameter to method 'foo'" "true"
|
||||
public class S {
|
||||
|
||||
void foo(A a, B b) {
|
||||
}
|
||||
|
||||
void bar(B b) {
|
||||
A a = getA();
|
||||
foo(a, b);
|
||||
}
|
||||
|
||||
A getA() {
|
||||
return new A();
|
||||
}
|
||||
}
|
||||
|
||||
class A {
|
||||
}
|
||||
|
||||
class B extends A {
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
// "Add 'B' as 1st parameter to method 'foo'" "true"
|
||||
public class S {
|
||||
|
||||
void foo(B b, A a) {
|
||||
}
|
||||
|
||||
void bar(B b) {
|
||||
A a = getA();
|
||||
foo(<caret>b, a);
|
||||
}
|
||||
|
||||
A getA() {
|
||||
return new A();
|
||||
}
|
||||
}
|
||||
|
||||
class A {
|
||||
}
|
||||
|
||||
class B extends A {
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
// "Add 'A' as 2nd parameter to method 'foo'" "true"
|
||||
public class S {
|
||||
|
||||
void foo(A a, A a1) {
|
||||
}
|
||||
|
||||
void bar(B b) {
|
||||
A a = getA();
|
||||
foo(b, a);
|
||||
}
|
||||
|
||||
A getA() {
|
||||
return new A();
|
||||
}
|
||||
}
|
||||
|
||||
class A {
|
||||
}
|
||||
|
||||
class B extends A {
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
// "Add 'A' as 1st parameter to method 'foo'" "true"
|
||||
public class S {
|
||||
|
||||
void foo(A a1, A a) {
|
||||
}
|
||||
|
||||
void bar(B b) {
|
||||
A a = getA();
|
||||
foo(a, b);
|
||||
}
|
||||
|
||||
A getA() {
|
||||
return new A();
|
||||
}
|
||||
}
|
||||
|
||||
class A {
|
||||
}
|
||||
|
||||
class B extends A {
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
// "Add 'String' as 2nd parameter to method 'foo'" "true"
|
||||
public class S {
|
||||
|
||||
void foo(A a, String s) {
|
||||
}
|
||||
|
||||
void bar(B b) {
|
||||
A a = getA();
|
||||
foo(a, <caret>"");
|
||||
}
|
||||
|
||||
A getA() {
|
||||
return new A();
|
||||
}
|
||||
}
|
||||
|
||||
class A {
|
||||
}
|
||||
|
||||
class B extends A {
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
// "Add 'B' as 2nd parameter to method 'foo'" "true"
|
||||
public class S {
|
||||
|
||||
void foo(A a) {
|
||||
}
|
||||
|
||||
void bar(B b) {
|
||||
A a = getA();
|
||||
foo(a, <caret>b);
|
||||
}
|
||||
|
||||
A getA() {
|
||||
return new A();
|
||||
}
|
||||
}
|
||||
|
||||
class A {
|
||||
}
|
||||
|
||||
class B extends A {
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
// "Add 'B' as 1st parameter to method 'foo'" "true"
|
||||
public class S {
|
||||
|
||||
void foo(A a) {
|
||||
}
|
||||
|
||||
void bar(B b) {
|
||||
A a = getA();
|
||||
foo(<caret>b, a);
|
||||
}
|
||||
|
||||
A getA() {
|
||||
return new A();
|
||||
}
|
||||
}
|
||||
|
||||
class A {
|
||||
}
|
||||
|
||||
class B extends A {
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
// "Add 'A' as 2nd parameter to method 'foo'" "true"
|
||||
public class S {
|
||||
|
||||
void foo(A a) {
|
||||
}
|
||||
|
||||
void bar(B b) {
|
||||
A a = getA();
|
||||
foo(<caret>b, a);
|
||||
}
|
||||
|
||||
A getA() {
|
||||
return new A();
|
||||
}
|
||||
}
|
||||
|
||||
class A {
|
||||
}
|
||||
|
||||
class B extends A {
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
// "Add 'A' as 1st parameter to method 'foo'" "true"
|
||||
public class S {
|
||||
|
||||
void foo(A a) {
|
||||
}
|
||||
|
||||
void bar(B b) {
|
||||
A a = getA();
|
||||
foo(a, <caret>b);
|
||||
}
|
||||
|
||||
A getA() {
|
||||
return new A();
|
||||
}
|
||||
}
|
||||
|
||||
class A {
|
||||
}
|
||||
|
||||
class B extends A {
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
// "Add 'String' as 2nd parameter to method 'foo'" "true"
|
||||
public class S {
|
||||
|
||||
void foo(A a) {
|
||||
}
|
||||
|
||||
void bar(B b) {
|
||||
A a = getA();
|
||||
foo(a, <caret>"");
|
||||
}
|
||||
|
||||
A getA() {
|
||||
return new A();
|
||||
}
|
||||
}
|
||||
|
||||
class A {
|
||||
}
|
||||
|
||||
class B extends A {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user