groovy
  1. groovy
  2. GROOVY-5154

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

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-beta-1
    • Fix Version/s: 2.0-beta-2
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      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 {
      }
      

        Activity

        Roshan Dawrani made changes -
        Field Original Value New Value
        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 {
        }
        The following code produces static type checking error:

        {code}
        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 {
        }
        {code}
        CÚdric Champeau made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Cedric Champeau [ melix ]
        Fix Version/s 2.0-beta-2 [ 18072 ]
        Resolution Fixed [ 1 ]
        Paul King made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            CÚdric Champeau
            Reporter:
            Valery Shyshkin
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: