extract method: reduce varargs to component type when weaker return type is prepared ( IDEA-54953 )

This commit is contained in:
anna
2010-05-14 19:39:42 +04:00
parent dc4f848fa1
commit 0007ada693
4 changed files with 36 additions and 1 deletions

View File

@@ -0,0 +1,12 @@
class Test {
void foo() {
bar(<selection>String.valueOf(1)</selection>);
baz(String.valueOf(1));
}
private void bar(String s) {
}
private void baz(String... s) {
}
}

View File

@@ -0,0 +1,16 @@
class Test {
void foo() {
bar(newMethod());
baz(newMethod());
}
private String newMethod() {
return String.valueOf(1);
}
private void bar(String s) {
}
private void baz(String... s) {
}
}