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

Generic method declaration should see the super class

    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

          People

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

            Dates

              Created:
              Updated:
              Resolved: