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

curried closure: getParameterTypes() doesn't work

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0
    • 1.1-beta-1
    • None
    • None

    Description

      getParameterTypes() return null on curried closures what is wrong, see test below

      def cl1 =

      { String s1, int i -> return s1 + i }

      assert "foo5" == cl1("foo", 5)
      println cl1.getParameterTypes()
      assert [String, int] == cl1.getParameterTypes().toList()

      def cl2 = cl1.curry("bla")
      assert "bla4" == cl2(4)
      println cl2.getParameterTypes()
      assert null != cl2.getParameterTypes() // fails here
      assert [int] == cl2.getParameterTypes().toList()

      Attachments

        Issue Links

          Activity

            People

              blackdrag Jochen Theodorou
              mguillemot@yahoo.fr Marc Guillemot
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: