Details
-
Sub-task
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.0-RC-1
-
None
-
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
- is related to
-
GROOVY-1875 private fields and private methods are not private
- Open
- relates to
-
GROOVY-1063 No access protection for private static fields
- Open