diff options
author | Andy Clement <aclement@vmware.com> | 2012-03-15 10:03:03 -0700 |
---|---|---|
committer | Andy Clement <aclement@vmware.com> | 2012-03-15 10:03:03 -0700 |
commit | 42035aea54234894721cca2858035002c7bfa9c7 (patch) | |
tree | 9a1eabed72dd2146f1d9cb41e2085ea0d3315c4c /tests/bugs170 | |
parent | 2a944dbb2cd25a31c93d3e945f0cf07b406a3090 (diff) | |
download | aspectj-42035aea54234894721cca2858035002c7bfa9c7.tar.gz aspectj-42035aea54234894721cca2858035002c7bfa9c7.zip |
pr73507 - wip
Diffstat (limited to 'tests/bugs170')
-rw-r--r-- | tests/bugs170/pr73507/Case1.java | 20 | ||||
-rw-r--r-- | tests/bugs170/pr73507/Case2.java | 19 | ||||
-rw-r--r-- | tests/bugs170/pr73507/Case3.java | 27 | ||||
-rw-r--r-- | tests/bugs170/pr73507/Case4.java | 18 |
4 files changed, 84 insertions, 0 deletions
diff --git a/tests/bugs170/pr73507/Case1.java b/tests/bugs170/pr73507/Case1.java new file mode 100644 index 000000000..74a645851 --- /dev/null +++ b/tests/bugs170/pr73507/Case1.java @@ -0,0 +1,20 @@ +import java.lang.reflect.*; + +interface I { +} + + +class C implements I { +} + +public aspect Case1 { + + public int I.i; + + public static void main(String []argv) throws Exception { + Field f = C.class.getField("i"); + if (f==null) System.out.println("Couldn't find a field called i"); + else System.out.println("Found a field called i"); + } + +} diff --git a/tests/bugs170/pr73507/Case2.java b/tests/bugs170/pr73507/Case2.java new file mode 100644 index 000000000..15ba1665f --- /dev/null +++ b/tests/bugs170/pr73507/Case2.java @@ -0,0 +1,19 @@ +import java.lang.reflect.*; + +interface I { +} + + +class C implements I { + public int i = 1; +} + +public aspect Case2 { + + public int I.i = 5; + + public static void main(String []argv) { + System.out.println("Value of C.i is "+new C().i); + } + +} diff --git a/tests/bugs170/pr73507/Case3.java b/tests/bugs170/pr73507/Case3.java new file mode 100644 index 000000000..588d97dc2 --- /dev/null +++ b/tests/bugs170/pr73507/Case3.java @@ -0,0 +1,27 @@ +import java.lang.reflect.*; + +interface I { +} + + +class C implements I { +} + +public aspect Case3 { + + // one order + public int C.i = 1; + public int I.i = 5; + + // the other order ;) + public int I.j = 5; + public int C.j = 1; + + public static void main(String []argv) { + System.out.println("Value of C.i is "+new C().i); + System.out.println("Value of C.j is "+new C().j); + System.out.println("Value of I.i is "+((I)new C()).i); + System.out.println("Value of I.j is "+((I)new C()).j); + } + +} diff --git a/tests/bugs170/pr73507/Case4.java b/tests/bugs170/pr73507/Case4.java new file mode 100644 index 000000000..08912fbc1 --- /dev/null +++ b/tests/bugs170/pr73507/Case4.java @@ -0,0 +1,18 @@ +import java.lang.reflect.*; + +interface I { +} + + +class C implements I { + public int i = 1; +} + +public aspect Case4 { + + public String I.i = "hello"; + + public static void main(String []argv) { + } + +} |