introduce variable/occurrences: allow to walk up through anonymous

the current behavior is not transitive as occurrences inside anonymous when selected outside were detected (IDEA-174339)
This commit is contained in:
Anna Kozlova
2017-06-15 13:52:55 +03:00
parent 46e403bfa1
commit fb3295db37
4 changed files with 46 additions and 3 deletions
@@ -0,0 +1,14 @@
class Bug {
Bug(String s) {}
void m(String s) {
final String str = s.substring(1);
new Bug(str) {
@Override
public String toString() {
return str;
}
};
}
}
@@ -0,0 +1,13 @@
class Bug {
Bug(String s) {}
void m(String s) {
new Bug(s.substring(1)) {
@Override
public String toString() {
return <selection>s.substring(1)</selection>;
}
};
}
}