With the proposed changes to generate lambda methods as private interface methods (changes attached as patch that Robert Field provided), javac crashes during compilation of the following test case provided in JDK-8006267. <test_code> interface Sup { default void m() { } } interface I extends Sup { default void m() { Runnable r = ()-> { Sup.super.m(); }; //the plan is to generate a private instance synthetic method for translating this lambda away r.run(); } } class ImplI implements I {} class TestTwo { public static void main(String[] args) { ImplI mi = new ImplI(); mi.m(); } } </test_code>
|