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

Can't delegate (with the @Delegate annotation) to a method whose name contains a dollar ($) character

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2.0
    • 2.5.0-alpha-1
    • Compiler, xforms
    • Linux (Ubuntu 12.04), Java SE (Oracle) 1.7.0_45-b18, Groovy 2.2.0

    Description

      As of 2.2.0 it's no longer possible to delegate (via the @Delegate annotation) to a method whose name contains a dollar ($) character. The attached test case compiles and runs without error under Groovy 2.1.3 and 2.1.6, but fails to compile with the following error under 2.2.0:

      > Caught: groovy.lang.MissingMethodException: No signature of method: Delegating.te$t() is applicable for argument types: (java.lang.Integer) values: [42]
      > Possible solutions: test(java.lang.Integer), wait(), getAt(java.lang.String), wait(long), wait(long, int), dump()

      Attachments

        1. dollar_delegate.groovy
          0.8 kB
          chocolateboy

        Issue Links

          Activity

            People

              paulk Paul King
              chocolateboy chocolateboy
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: