Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-3010 fix private field visibility
  3. GROOVY-1875

private fields and private methods are not private

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.1-beta-1
    • None
    • class generator
    • None
    • Windows XP - Java 1.6.0 - Groovy 1.1-beta-1

    Description

      class Test {
      private text
      private def getText()

      { text.toUpperCase() }

      private void setText( text )

      { this.text = text * 10 }

      }

      using the previous class with the following script

      x = new Test()
      x.text = "z"
      println x.text

      give the result: "ZZZZZZZZZZ"

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              louis martin Louis Martin
              Votes:
              31 Vote for this issue
              Watchers:
              28 Start watching this issue

              Dates

                Created:
                Updated: