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

Problem with @Newify

    XMLWordPrintableJSON

Details

    Description

      I get an error when I try to print an "newified" object:

      @Newify foo() {
      assert 42 == Integer.new(42)
      println (Integer.new(42))
      }

      foo()

      Exception thrown: No signature of method: static java.lang.Integer.new() is applicable for argument types: (java.lang.Integer) values: [42]

      groovy.lang.MissingMethodException: No signature of method: static java.lang.Integer.new() is applicable for argument types: (java.lang.Integer) values: [42]
      at ConsoleScript0.foo(ConsoleScript0:3)
      at ConsoleScript0$foo.callCurrent(Unknown Source)
      at ConsoleScript0.run(ConsoleScript0:6)

      Attachments

        Activity

          People

            roshandawrani Roshan Dawrani
            jheldmann Joachim Heldmann
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: