aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs171
diff options
context:
space:
mode:
authorAndy Clement <andrew.clement@gmail.com>2012-08-17 14:31:53 -0700
committerAndy Clement <andrew.clement@gmail.com>2012-08-17 14:31:53 -0700
commitd0c81b74d7c2254cea2b8820a1cabda158978e83 (patch)
tree72a7116e3266c8949543d2657e28466b15305b08 /tests/bugs171
parent993cef1c34849b5a3c92f5ddf4839ccf9047da77 (diff)
downloadaspectj-d0c81b74d7c2254cea2b8820a1cabda158978e83.tar.gz
aspectj-d0c81b74d7c2254cea2b8820a1cabda158978e83.zip
73507 - it'd fields on interfaces no longer get mangled names by default
Diffstat (limited to 'tests/bugs171')
-rw-r--r--tests/bugs171/pr73507/Case1.java20
-rw-r--r--tests/bugs171/pr73507/Case2.java19
-rw-r--r--tests/bugs171/pr73507/Case3.java31
-rw-r--r--tests/bugs171/pr73507/Case4.java18
-rw-r--r--tests/bugs171/pr73507/Case5.java21
5 files changed, 109 insertions, 0 deletions
diff --git a/tests/bugs171/pr73507/Case1.java b/tests/bugs171/pr73507/Case1.java
new file mode 100644
index 000000000..246653631
--- /dev/null
+++ b/tests/bugs171/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/bugs171/pr73507/Case2.java b/tests/bugs171/pr73507/Case2.java
new file mode 100644
index 000000000..1068b938a
--- /dev/null
+++ b/tests/bugs171/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/bugs171/pr73507/Case3.java b/tests/bugs171/pr73507/Case3.java
new file mode 100644
index 000000000..3cfc979b5
--- /dev/null
+++ b/tests/bugs171/pr73507/Case3.java
@@ -0,0 +1,31 @@
+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 int I.k = 1;
+ public int C.k = 5;
+
+ 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 C.k is "+new C().k);
+ 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/bugs171/pr73507/Case4.java b/tests/bugs171/pr73507/Case4.java
new file mode 100644
index 000000000..8c6d28baf
--- /dev/null
+++ b/tests/bugs171/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) {
+ }
+
+}
diff --git a/tests/bugs171/pr73507/Case5.java b/tests/bugs171/pr73507/Case5.java
new file mode 100644
index 000000000..fa474d68d
--- /dev/null
+++ b/tests/bugs171/pr73507/Case5.java
@@ -0,0 +1,21 @@
+import java.lang.reflect.*;
+
+interface I {
+}
+
+
+class C implements I {
+}
+
+public aspect Case5 {
+
+ public String I.str = "hello";
+
+ public static void main(String []argv) {
+ Field[] fs = C.class.getDeclaredFields();
+ for (Field f: fs) {
+ System.out.println(f);
+ }
+ }
+
+}