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

Compiler error for misapplication of @FunctionalInterface

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Compiler
    • None

    Description

      groovyc does not emit errors for misuse of @FunctionalInterface. At minimum an interface with 0 or 2+ abstract methods should be an error. Bonus points for supporting traits as well – a trait compiles to an interface. And using the annotation on a class, enum or @interface is improper as well.

      @FunctionalInterface
      interface I {
      }
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            emilles Eric Milles
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: