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

Invalid Static Type Checking report on a method call with type parameters

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0-beta-1
    • 2.0-beta-2
    • None
    • None

    Description

      The following code produces static type checking error:

      import groovy.transform.*
      
      @TypeChecked 
      class Foo {
          def say() {
              FooWithGenerics f
              FooBound fb
              f.say(fb)
          }
      }
      
      class FooWithGenerics {
          def <T extends FooBound> void say(T p) {
          }
      }
      class FooBound {
      }
      

      Attachments

        Activity

          People

            melix Cédric Champeau
            vns Valery Shyshkin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: