Re: [abc-users] Semantics of private member introduction

From: Hossein Sadat-Mohtasham <sadat_at_cs.ualberta.ca>
Date: Wed, 19 Nov 2008 10:15:48 -0700

Thanks Eric,
>
> Which abc version are you using? Are you using the JastAdd frontend by

I'm using the abc-1.3.0 release with JastAdd front-end.

--Hossein

>
> any chance?
>
> Eric
>
> 2008/11/18 Hossein Sadat-Mohtasham <sadat_at_cs.ualberta.ca>:
>> Hi,
>> I've had the impression that a private field introduction is only
>> visible to
>> the defining aspect and not the target class. That's what I get in
>> AspectJ;
>> however, I get no complaint when I access such a field from within
>> a target
>> when compiling using abc-1.3.0.
>> Here is an example:
>> /*
>> *
>> * 1) private y should not be visible in Test but it is.
>> * 2) private x should not be visible in Aspect, but it is.
>> *
>> */
>> public class Test {
>>
>> private int x = 0;
>>
>> public static void main(String[] args) {
>> Test test = new Test();
>> test.f();
>> }
>> public void g() {
>> y = 2;
>> }
>> }
>> aspect testaspect {
>>
>> private int Test.y = 0;
>>
>> public void Test.f() {
>> x = 1;
>> y = 1;
>>
>>
>>
>> g();
>>
>> }
>> }
>> I might be mistaken, so let me know if so. I was expecting to get 2
>> compile
>> errors: one for accessing x in testaspect and the second one for
>> accessing y
>> in Test. With abc I don't get neither.
>> Thanks in advance for your thoughts.
>> --Hossein
>
>
>
> --
> Eric Bodden
> Sable Research Group, McGill University, Montréal, Canada
> Got an interesting job offer? http://www.bodden.de/hire-me/
Received on Wed Nov 19 2008 - 17:15:54 GMT

This archive was generated by hypermail 2.2.0 : Wed Nov 19 2008 - 18:10:17 GMT