blob: a12ae74ece2ddbb984fa9d268f45a8a7c69ed4c9 [file]
public class RedundantCast{
void m(IOEx e) throws IOEx {
throw <error descr="Inconvertible types; cannot cast 'RedundantCast.IOEx' to 'RedundantCast.FileNotFoundEx'">(<warning descr="Casting 'e' to 'FileNotFoundEx' is redundant">FileNotFoundEx</warning>)e</error>;
}
void foo(RuntimeException e) {
throw (<warning descr="Casting 'e' to 'Ex' is redundant">Ex</warning>)e;
}
static class Ex extends RuntimeException {}
static class IOEx extends Exception {}
static class FileNotFoundEx extends Exception {}
}