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

MetaClassImpl invokeStaticMethod recurses up the class hierarchy losing the original sender

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.0, 1.1-beta-1, 1.1-beta-2
    • 1.1-beta-3
    • None
    • None

    Description

      Currently if you do

      class A {}
      class B extends A{}
      
      Boo.foo()
      

      You get:
      groovy.lang.MissingMethodException: No signature of method: static A.foo() is applicable for argument types: () values: {}

      This is because invokeStaticMethod uses recursion up the class hierarchy and loses the original sender information. This makes for bad error messages and also result in other problems such as if B defines a "methodMissing" it is never invoked.

      Attachments

        Activity

          People

            graemerocher Graeme Rocher
            graemerocher Graeme Rocher
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: