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

Named argument constructor doesn't work for inner classes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.7.10
    • 1.8.3, 1.9-beta-4
    • Compiler
    • 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

        1. commit-36655bb.diff
          5 kB
          Roshan Dawrani

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: