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

Named argument constructor doesn't work for inner classes

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.7.10
    • Fix Version/s: 1.8.3, 1.9-beta-4
    • Component/s: Compiler
    • Labels:
      None

      Description

      class Outer {
        class Inner {
          String name
        }
      
        def doit() {
          new Inner(name: "fred")
        }
      }
      
      new Outer().doit()
      
      Caught: groovy.lang.GroovyRuntimeException: Could not find matching constructor for: Outer$Inner(Outer, java.util.LinkedHashMap)
      	at Outer.doit(OuterF.groovy:7)
      	at OuterF.run(OuterF.groovy:11)
      

        Attachments

          Activity

            People

            • Assignee:
              roshandawrani Roshan Dawrani
              Reporter:
              pniederw Peter Niederwieser
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: