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

type checking with generics

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.4.4
    • 2.4.6
    • Static Type Checker
    • 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

              melix Cédric Champeau
              jechlin JAMIE ECHLIN
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: