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

STC: missing property error for implicit-this reference to private super field or method

    XMLWordPrintableJSON

Details

    Description

      Follow up from GROOVY-11319. One case that was left unhandled is the implicit-this case. Consider the following:

      abstract class A {
        private int x // or "private int getX() {}"
      }
      class C extends A {
        @TypeChecked m() {
          super.x // "No such property: x" error
          this.x // "No such property: x" error
          x // MissingPropertyException at runtime
          this.with {
            thisObject.x // "No such property: x" error
            delegate.x // "No such property: x" error
            owner.x // "No such property: x" error
            this.x // "No such property: x" error
            it.x // "No such property: x" error
            x // MissingPropertyException at runtime
          }
        }
      }
      

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: