Details

    • Type: Sub-task
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.0-RC-1
    • Fix Version/s: None
    • Component/s: groovy-runtime
    • Labels:
      None

      Description

      If I declare a private field like this...

      Person.groovy
      class Person {
         private firstName
      }
      

      I can still access this field from another class like this...

      Foo.groovy
      class Foo {
         def doIt() {
             def p = new Person(firstName:'Jeff')
             println p.firstName
         }
         static void main(args) {
             new Foo().doIt()
         }
      }
      

      I don't think that I should be able to access p.firstName inside of the Foo class.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                brownj Jeff Brown
              • Votes:
                13 Vote for this issue
                Watchers:
                13 Start watching this issue

                Dates

                • Created:
                  Updated: