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

Make @Delegate work with @DelegatesTo

    XMLWordPrintableJSON

Details

    Description

      It would be interesting to get @Delegate working with @DelegatesTo e.g.:

      @CompileStatic
      class SomeBuilder{
         @Delegate AnotherBuilder
         @Delegate AnotherBuilder2
         @Delegate AnotherBuilder3
      
         static Some build (@DelegatesTo(SomeBuilder) Closure c) {
            c()
            //...
         }  
      }
      
      class AnotherBuilder{
            String prop
      }
      
      
      SomeBuilder.create{
        prop = 'test' //from AnotherBuilder
      }
      

      Attachments

        Activity

          People

            melix Cédric Champeau
            pred Stéphane Maldini
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: