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

Compilation error for generic interface method

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.7.5, 1.8-beta-2
    • Fix Version/s: 1.8.1, 1.7.11
    • Component/s: Compiler
    • Labels:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: