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

Cannot compile generic method without public keyword

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.5.7
    • 3.0.0-beta-2
    • Compiler
    • None
    • Windows 10(1803)

    Description

      class Example {
        <T> T get(T value) {
          value
        }
      }

      unexpected token: <

      class Example {
        public <T> T get(T value) {
          value
        }
      }

      works fine

      Attachments

        Activity

          People

            daniel_sun Daniel Sun
            Anvar Минск
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: