diff options
author | aclement <aclement> | 2010-01-21 18:39:53 +0000 |
---|---|---|
committer | aclement <aclement> | 2010-01-21 18:39:53 +0000 |
commit | f91ffb032fae7c7d9f59f4aedf27f067ba60919e (patch) | |
tree | df21f06a213e08536473f9b1e21542909c28d0a3 /tests/features169/transparent/InteractingOldAndNew.java | |
parent | f7591e67250f1e6717bbebb23b5bb9c47fb05204 (diff) | |
download | aspectj-f91ffb032fae7c7d9f59f4aedf27f067ba60919e.tar.gz aspectj-f91ffb032fae7c7d9f59f4aedf27f067ba60919e.zip |
299552: private ITD fields stay private in target (with unmangled name)
Diffstat (limited to 'tests/features169/transparent/InteractingOldAndNew.java')
-rw-r--r-- | tests/features169/transparent/InteractingOldAndNew.java | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/tests/features169/transparent/InteractingOldAndNew.java b/tests/features169/transparent/InteractingOldAndNew.java new file mode 100644 index 000000000..387b21d55 --- /dev/null +++ b/tests/features169/transparent/InteractingOldAndNew.java @@ -0,0 +1,38 @@ +// Interacting private ITDs + +public class InteractingOldAndNew { + public static void main(String []argv) { + InteractingOldAndNew inst = new InteractingOldAndNew(); + inst.setI1(12); + inst.setI2(65); + int value = inst.getI1(); + if (value!=12) { throw new RuntimeException(Integer.toString(value)); } + value = inst.getI2(); + if (value!=65) { throw new RuntimeException(Integer.toString(value)); } + } +} + + +aspect X { + private int InteractingOldAndNew.i; + + public int InteractingOldAndNew.getI1() { + return i; + } + + public void InteractingOldAndNew.setI1(int newvalue) { + i = newvalue; + } +} + +aspect Y { + private int InteractingOldAndNew.i; + + public int InteractingOldAndNew.getI2() { + return i; + } + + public void InteractingOldAndNew.setI2(int newvalue) { + i = newvalue; + } +} |