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

type checking with generics

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.4
    • Fix Version/s: 2.4.6
    • Component/s: Static Type Checker
    • Labels:
      None

      Description

      The following compiles without error... I don't think it should:

      import groovy.transform.TypeChecked
      
      @TypeChecked
      class C extends Script {
      
          @Override
          List<String> run() {
              [11, 12]
          }
      }
      

      What I would expect to see is:
      Cannot return ArrayList<Integer> from method returning List<String>

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                melix C├ędric Champeau
                Reporter:
                jechlin JAMIE ECHLIN
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: