mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-07 22:09:38 +07:00
extract method: reduce varargs to component type when weaker return type is prepared ( IDEA-54953 )
This commit is contained in:
@@ -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) {
|
||||
}
|
||||
}
|
||||
@@ -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) {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user