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

method call for method with same name as a field causes wierdness

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.0-beta-10
    • class generator
    • None

    Description

      The following would cause issues - as it would see a field exists for the method name and immediately try and invoke it as if it were a closure.

      class FieldPropertyMethodDisambiguationTest extends GroovyTestCase {
      String bar = "property"

      String getBar()

      { return "propertyMethod" }

      String bar()

      { return "method" }

      String bar(param)

      { return "method with param: " + param }

      void testCase()

      { bar() }

      }

      Attachments

        Activity

          People

            jstrachan James Strachan
            jstrachan James Strachan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: