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

Compilation error for generic interface method

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.7.5, 1.8-beta-2
    • 1.8.1, 1.7.11
    • Compiler
    • None

    Description

      Repro:

      Compile

      interface Foo {
          public <N extends Number> void foo()
      }
      

      Result:

      unexpected token: public @ line 2, column 5.
             public <N extends Number> void foo()
             ^
      

      Making Foo an abstract class avoids the problem:

      abstract class Foo {
          public abstract <N extends Number> void foo()
      }
      

      Attachments

        Issue Links

          Activity

            People

              paulk Paul King
              sukhyun.cho sukhyun.cho
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: