@@ -0,0 +1,719 @@
+public class OverlyStrongTypeCastInspection%7B%0A    String test1(Bar bar)%7B%0A        // Inspection says this cast can be weakened to MyIterator%0A        // when it can't and the quick fix breaks the code.%0A        return ((MyBar) bar).foos.string;%0A    %7D%0A%0A    String test2(Object bar)%7B%0A        // inspection does not suggest that (MyBar) can be weakened to (Bar)%0A        ((MyBar) bar).arg();%0A        // inspection does not suggest that (MyBar) can be weakened to (Bar)%0A        return ((MyBar) bar).string;%0A    %7D%0A%7D%0A%0Ainterface Bar%7B%0A    String string = %22bla%22;%0A%0A    void arg();%0A%7D%0A%0Aclass MyBar implements Bar%7B%0A    Foos foos;%0A%0A    public void arg()%7B%0A    %7D%0A%7D%0A%0Aclass Foos%7B%0A    public String string = %22%22;%0A%0A    public void foo()%7B%0A    %7D%0A%7D

Fix for IDEA-2902