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

Generic method declaration should see the super class

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      @groovy.transform.CompileStatic
      void test() {
          List<Number> list = [1]
      }
      
      C:\Users\Yu\Desktop\test.groovy: 3: [Static type checking] - Incompatible generic argument types. Cannot assign java.util.List <java.lang.Integer> to: java.util.List <Number>
       @ line 3, column 25.
             List<Number> list = [1]
                                 ^
      

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            emilles Eric Milles
            yukoba Yu Kobayashi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment