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

MIssed generics in delegated method

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.4.0-rc-1
    • Compiler
    • None

    Description

      class A {
          public <T> T foo(Closure<T> c) {c.call()}
      }
      
      class B {
          @Delegate
          A a = new A()
      }
      

      A#foo's signature:

      // access flags 0x1
      // signature <T:Ljava/lang/Object;>(Lgroovy/lang/Closure<TT;>;)TT;
      // declaration: T foo<T>(groovy.lang.Closure<T>)
      public foo(Lgroovy/lang/Closure;)Ljava/lang/Object;
      

      B#foo's signature:

      // access flags 0x1
      // signature <T:Ljava/lang/Object;>(Lgroovy/lang/Closure;)Ljava/lang/Object;
      // declaration:  foo<T>(groovy.lang.Closure)
      public foo(Lgroovy/lang/Closure;)Ljava/lang/Object;   
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            mxm-groovy Maxim Medvedev
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: