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

static foo(Closure) hides super.foo(Bar)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.5.7, 1.6-beta-2
    • 1.6-rc-1, 1.5.8, 1.7-beta-1
    • None
    • None

    Description

      Trying to implement a member function with the same name but different parameter signature and using super to call the parent's implementation is blocked by having a static method of the same name with a Closure parameter.

      This may not be really about Closure and/or Script because a similar (but different) error if there is a static method with a different parameter type.

      Attachments

        1. 3163_v15x.diff
          1 kB
          Roshan Dawrani
        2. 3163_v16x.diff
          1 kB
          Roshan Dawrani
        3. 3163_v17x.diff
          1 kB
          Roshan Dawrani
        4. groovy-3163-test.txt
          1 kB
          James P. White
        5. SomeBaseClass.java
          0.4 kB
          James P. White
        6. SomeImplementorWithStatic.groovy
          0.7 kB
          James P. White
        7. SomeJavaImplementorWithStatic.java
          0.8 kB
          James P. White
        8. TestOverrideWithSuper.groovy
          0.3 kB
          James P. White

        Activity

          People

            jimwhite James P. White
            jimwhite James P. White
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: