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

VariableScopeVisitor.getPropertyName does not check for "isser" style method

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.4.15, 3.0.0-alpha-3, 2.5.2
    • 3.0.0-alpha-4, 2.5.3
    • None
    • None

    Description

      Consider the following:

      class C {
        Object getFoo() {}
        boolean isBar() {}
        void setBaz(val) {}
        void method() {
          foo
          bar
          baz
        }
      }
      

      VariableScopeVisitor returns a PropertyNode from findClassMember for foo and baz. However, the bar reference is seen as a MethodNode. VariableScopeVisitor.getPropertyName only checks for "get" and "set". Could it check for "is" and boolean return?

      Attachments

        Activity

          People

            paulk Paul King
            emilles Eric Milles
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: