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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4.15, 3.0.0-alpha-3, 2.5.2
    • Fix Version/s: 3.0.0-alpha-4, 2.5.3
    • Component/s: None
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: