[Grace-core] The no shadowing rule
Michael Homer
mwh at ecs.vuw.ac.nz
Tue Sep 23 21:48:15 PDT 2014
On Wed, Sep 24, 2014 at 4:41 PM, Kim Bruce <kim at cs.pomona.edu> wrote:
> The difference between the two is that in programs 1 & 2 the x which is a
> parameter is in the same scope as the def x (respectively, method x) inside
> the class.
No it isn't. Parameter declarations are scoped to the method, and
field declarations are scoped to the object.
-Michael
More information about the Grace-core
mailing list