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

@Newify AST transformation doesn't work for anon inner classes

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.0-rc-3
    • Fix Version/s: 2.3.7, 2.4.0-beta-3
    • Component/s: xforms
    • Labels:
      None

      Description

      This code:

      @Newify String test() {
        new Object() { def x() { String.new('ABC') } }.x()
      }
      assert "ABC"==test()
      

      results in:

      groovy.lang.MissingMethodException: No signature of method: static java.lang.String.new() is applicable for argument types: (java.lang.String) values: [ABC]
      

        Attachments

          Activity

            People

            • Assignee:
              paulk Paul King
              Reporter:
              uehaj UEHARA Junji
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: