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

Bad code green: empty list literal with each method

    XMLWordPrintableJSON

Details

    Description

      @groovy.transform.CompileStatic
      List<String> usage() {
        def l = [].each {}
        return l // expected error: Incompatible generic argument types. Cannot assign java.util.List <java.lang.Object> to: java.util.List <String}

      Attachments

        Activity

          People

            emilles Eric Milles
            daniilo Daniil Ovchinnikov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 50m
                50m