mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 15:27:45 +07:00
IDEA-119052 Java smart type code completion proposes incorrect variant if non-matching local variable hides a matching instance variable
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import java.util.Collection;
|
||||
|
||||
class A {
|
||||
String join(Collection<String> strings) {
|
||||
return StringUtil.join(strings, ",");
|
||||
}
|
||||
|
||||
void method(Collection<String> param) {
|
||||
new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
String[] param = {""}; // hides the parameter
|
||||
Collection<String> params = Arrays.asList(param);
|
||||
join(params)<caret>
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
import java.util.Collection;
|
||||
|
||||
class A {
|
||||
String join(Collection<String> strings) {
|
||||
return StringUtil.join(strings, ",");
|
||||
}
|
||||
|
||||
void method(Collection<String> param) {
|
||||
new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
String[] param = {""}; // hides the parameter
|
||||
Collection<String> params = Arrays.asList(param);
|
||||
join(<caret>)
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user