[
https://issues.apache.org/jira/browse/GROOVY-9801?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17772057#comment-17772057
]
ASF GitHub Bot commented on GROOVY-9801:
----------------------------------------
daniellansun commented on PR #1963:
URL: https://github.com/apache/groovy/pull/1963#issuecomment-1747975308
Merged. Thanks.
> Stub generator omits default interface methods
> ----------------------------------------------
>
> Key: GROOVY-9801
> URL: https://issues.apache.org/jira/browse/GROOVY-9801
> Project: Groovy
> Issue Type: Bug
> Components: Stub generator / Joint compiler
> Affects Versions: 3.0.6
> Reporter: Christopher Smith
> Assignee: Jochen Theodorou
> Priority: Major
> Fix For: 5.0.0-alpha-2
>
> Time Spent: 1h
> Remaining Estimate: 0h
>
> When presented with a Groovy interface that has a default method (shiny and
> new!) the stub generator omits the "default" part, leading to compilation
> failures in Java classes due to unimplemented abstract methods.
> {code:groovy}
> interface HasDefaultMethod {
> default void method() { }
> }
> {code}
> {code:java}
> import java.lang.*;
> import java.util.*;
> import java.io.*;
> import java.net.*;
> import groovy.lang.*;
> import groovy.util.*;
> @groovy.transform.Trait() public interface HasDefaultMethod
> {
> ;
> void method();
> }
> {code}
> (The stray semicolon is also odd but doesn't appear to be pathological.)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)