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

Type checker doesn't allow property notation as LHS when only a setter exists

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.0.1
    • Component/s: Static Type Checker
    • Labels:
      None

      Description

      If a class has only a setter, but no getter:

      class A {
         void setFoo(String arg) {}
      }
      

      Then the type checker doesn't allow the property notation for assignments:

      def a = new A()
      a.foo = 'bar'
      

        Attachments

          Activity

            People

            • Assignee:
              melix Cédric Champeau
              Reporter:
              melix Cédric Champeau
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: