[ https://issues.apache.org/jira/browse/GROOVY-10380?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Milles updated GROOVY-10380: --------------------------------- Fix Version/s: 3.0.20 > SC: IncompatibleClassChangeError when calling interface default method from > non-public interface > ------------------------------------------------------------------------------------------------ > > Key: GROOVY-10380 > URL: https://issues.apache.org/jira/browse/GROOVY-10380 > Project: Groovy > Issue Type: Bug > Components: Static compilation > Reporter: Eric Milles > Assignee: Eric Milles > Priority: Major > Labels: default-methods > Fix For: 4.0.0-rc-1, 3.0.20 > > > Consider the following: > {code:java} > package p; > interface I { > default void m() { > System.out.println("works"); > } > } > public abstract class A implements I { // or concrete or implemented in groovy > } > {code} > {code: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 > } > } > {code} > 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. -- This message was sent by Atlassian Jira (v8.20.10#820010)