Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
Description
Consider the following:
package p; interface I { default void m() { System.out.println("works"); } } public abstract class A implements I { // or concrete or implemented in groovy }
// not in package p @groovy.transform.CompileStatic // works if CompileDynamic or TypeChecked class C extends p.A { void test() { m() // IncompatibleClassChangeError: Found class C, but interface was expected } }
In the case of a non-public interface with a public default method, static compilation produces a runtime error that is not present for dynamic groovy or java.