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

@Delegate does not work with default method parameters

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.7.5
    • 1.7.6, 1.8-beta-3
    • class generator
    • None

    Description

      Hi!

      I am having problems with the following code:

      class Del {
      public void doSomething(boolean flag = true) {
      println flag
      }
      }

      class AClass {
      @Delegate Del del = new Del()
      }

      def a = new AClass()
      a.doSomething(true) // works fine
      a.doSomething() // methodMissingException

      Thank you!

      Attachments

        Activity

          People

            roshandawrani Roshan Dawrani
            luizzfar Luiz Ribeiro
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: