treeWalkUp: stop at member level to avoid skipping anonymous classes

This commit is contained in:
Anna.Kozlova
2016-04-19 20:00:27 +02:00
parent 6c39a86407
commit 2dead05e6b
3 changed files with 26 additions and 1 deletions

View File

@@ -0,0 +1,24 @@
import java.util.function.Function;
class It {
Function<It, TextRange> f = new Function<It, TextRange>() {
@Override
public TextRange apply(final It it) {
long offset = 9;
return offset == 0 ? it.range() : it.range().shiftRight((int) offset);
}
};
class TextRange {
public TextRange shiftRight(final int offset) {
return null;
}
}
TextRange range() {
return new TextRange();
}
}