void () { doTest(""" import java.util.Arrays; class Parent {} class Child extends Parent {} class Test { void test(Parent[] parent) { Child[] children = Arrays.stream(parent) .filter(t -> t instanceof Child) .toArray(Child[]::new); Child[] children2 = Arrays.stream(parent) .filter(Child.class::isInstance) .toArray(Child[]::new); Child[] children3 = Arrays.stream(parent) .filter(Child.class::isInstance) .filter(c -> c.hashCode() > 0) .toArray(Child[]::new); } }"""); }