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

STC: cannot set non-static outer class property via setter method

    XMLWordPrintableJSON

Details

    Description

      Consider the following:

      @groovy.transform.TypeChecked
      class Outer {
          class Inner {
              void test() {
                  setFoo("bar")
              }
          }
          def foo
      }
      

      The compiler emits an error for setFoo("bar") but foo = "bar" works just fine.

      Attachments

        Activity

          People

            emilles Eric Milles
            emilles Eric Milles
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: