interface SAM { void m(T t) throws R; } class MyTest { void f(E1 e1) { SAM s1 = s -> { if (s.length() > 0) throw (E1) (E2) e1; throw (E2) (E1)e1; }; } static class E1 extends Exception {} static class E2 extends E1 {} }