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

A public method annotated with @Memoized is not accessible by subclasses

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.1
    • Fix Version/s: 2.2.2
    • Component/s: None
    • Labels:
      None

      Description

      A public method annotated with @Memoized transformation is not accessible by subclasses.

      Tese case:

      class M {
      int count

      @groovy.transform.Memoized
      def int foo()

      { println 'foo' return ++count }

      }

      class Q extends M {}
      assert new Q().foo() == 1 // throws MissingMethodException

      Discussion thread
      http://groovy.329449.n5.nabble.com/Bug-in-Memoized-transformation-tc5717930.html

      Cheers,
      Paolo

        Attachments

          Activity

            People

            • Assignee:
              blackdrag Jochen Theodorou
              Reporter:
              pablo72 paolo di tommaso
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: