I fixed closure scoping such that "this" and "super" always refer to the outer this. Resolution of slots occurs on the outer class first (previously something like name would annoyingly resolve to Method.name). In the Java compiler there will be no mechanism to access the inner this, but I'm thinking in the Fan compiler we might support syntax such as "::this" or maybe just a method on sys::Method that returns the this (which would be the inner this).
brianWed 27 Dec 2006
Another fix I added was to give closures the same scope priviledges as their parent class - now closures can access the private and protected methods of their enclosing class.
brian Tue 12 Sep 2006
I fixed closure scoping such that "this" and "super" always refer to the outer this. Resolution of slots occurs on the outer class first (previously something like name would annoyingly resolve to Method.name). In the Java compiler there will be no mechanism to access the inner this, but I'm thinking in the Fan compiler we might support syntax such as "::this" or maybe just a method on sys::Method that returns the this (which would be the inner this).
brian Wed 27 Dec 2006
Another fix I added was to give closures the same scope priviledges as their parent class - now closures can access the private and protected methods of their enclosing class.