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

Cannot compile generic method without public keyword

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.5.7
    • Fix Version/s: 3.0.0-beta-2
    • Component/s: Compiler
    • Labels:
      None
    • Environment:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: