Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-9801

Stub generator omits default interface methods

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.0.6
    • None
    • None

    Description

      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.

      interface HasDefaultMethod {
        default void method() { }
      }
      
      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();
      }
      

      (The stray semicolon is also odd but doesn't appear to be pathological.)

      Attachments

        Issue Links

          Activity

            People

              keegan Keegan Witt
              chrylis Christopher Smith
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h
                  1h