aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs171
diff options
context:
space:
mode:
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);
+ }
+ }
+
+}