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

named parameters doesn't warn/produce an error when duplicates are given

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.6.3, 1.7-beta-1
    • None
    • None

    Description

      This code:

      def closure = { println it }
      closure debit: 30, credit: 40, debit: 50
      def method(map) {
          println map
      }
      method debit: 30, credit: 40, debit: 50
      

      produces this output:

      [debit:50, credit:40]
      [debit:50, credit:40]
      

      It should give a compile error.

      Attachments

        Activity

          People

            roshandawrani Roshan Dawrani
            paulk Paul King
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: