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

indy caching bug for static method invocations

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.3.0-beta-1, 2.2.3
    • Component/s: groovy-runtime
    • Labels:
      None

      Description

      class A {
          static bar() {1}
      }
      class B {
          static bar() {2}
      }
      static foo(Class c) {
          c.bar()
      }
      assert foo(A)==1
      assert foo(B)==2
      

      This fails because the indy code adds only a guard for the receiver being a Class, but not for the class itself

        Attachments

          Activity

            People

            • Assignee:
              blackdrag Jochen Theodorou
              Reporter:
              blackdrag Jochen Theodorou
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: