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

private super class members are not ignored

    XMLWordPrintableJSON

Details

    Description

      class Foo { private x=2 }
      class Bar extends Foo{}
      @groovy.transform.CompileStatic
      def foo() {
        return new Bar().x
      }
      

      the logic in existsProperty finds Foo#x, even though it is private. Groovy does not allow access to super class private members. Compilation should fail here in static compilation mode as well as with the type checker.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              blackdrag Jochen Theodorou
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: