Groovy
  1. Groovy
  2. GROOVY-4863

1.8 incompatibility with named parameters

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.8.0, 1.8.1, 1.9-beta-1
    • Fix Version/s: 1.8.2, 1.9-beta-3
    • Component/s: None
    • Labels:
      None
    • Environment:
      Mac OS 10.6.7, Java 6

      Description

      See http://groovy.markmail.org/message/wuskviqggfgzos7r?q=1%2E8+incompatibility&page=1

      I have methods that support named parameters via a Map and positional method with the same name. Works on 1.7.x but gives stack overflow error on 1.8.

      foo('xxxx')
      
      def foo(final Map map) {
          println map
      }
      
      def foo(final name) {
          return foo(name: name)
      }
      
      imac:info bob$ groovy test18.groovy
      Caught: java.lang.StackOverflowError
      	at test18.foo(test18.groovy)
      	at test18.foo(test18.groovy:8)
      	at test18.foo(test18.groovy:8)
      	at test18.foo(test18.groovy:8)
      
      

        Activity

        Bob Swift created issue -
        Guillaume Delcroix made changes -
        Field Original Value New Value
        Fix Version/s 1.9-beta-1 [ 17153 ]
        Fix Version/s 1.8.1 [ 17223 ]
        Guillaume Delcroix made changes -
        Fix Version/s 1.8.2 [ 17495 ]
        Fix Version/s 1.8.1 [ 17223 ]
        Guillaume Delcroix made changes -
        Fix Version/s 1.9-beta-1 [ 17153 ]
        Fix Version/s 1.9-beta-2 [ 17494 ]
        Paul King made changes -
        Affects Version/s 1.9-beta-1 [ 17153 ]
        Paul King made changes -
        Priority Major [ 3 ] Blocker [ 1 ]
        Jochen Theodorou made changes -
        Resolution Fixed [ 1 ]
        Assignee Jochen Theodorou [ blackdrag ]
        Status Open [ 1 ] Closed [ 6 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 13:32:57 UTC 2015 [ 1428240777691 ]
        Mark Thomas made changes -
        Workflow jira [ 12733789 ] Default workflow, editable Closed status [ 12745572 ]
        Mark Thomas made changes -
        Project Import Mon Apr 06 02:11:23 UTC 2015 [ 1428286283443 ]
        Mark Thomas made changes -
        Workflow jira [ 12971301 ] Default workflow, editable Closed status [ 12978970 ]

          People

          • Assignee:
            Jochen Theodorou
            Reporter:
            Bob Swift
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development