summaryrefslogtreecommitdiffstats
path: root/tests/bugs162
diff options
context:
space:
mode:
authoraclement <aclement>2008-08-20 22:06:53 +0000
committeraclement <aclement>2008-08-20 22:06:53 +0000
commitd94ade722d8a1212aa7c9b6ca90fe47a637e2c7a (patch)
tree7d19bc74861efdfd5044e621666ab12f3f1b7ccc /tests/bugs162
parent95bf99ab559ce926df99e84f811934f98eaf6b49 (diff)
downloadaspectj-d94ade722d8a1212aa7c9b6ca90fe47a637e2c7a.tar.gz
aspectj-d94ade722d8a1212aa7c9b6ca90fe47a637e2c7a.zip
222648: testcode
Diffstat (limited to 'tests/bugs162')
-rw-r--r--tests/bugs162/pr222648/DataAspect.aj11
-rw-r--r--tests/bugs162/pr222648/DataInterface.java9
-rw-r--r--tests/bugs162/pr222648/Foo.java12
-rw-r--r--tests/bugs162/pr222648/FooBase.java9
-rw-r--r--tests/bugs162/pr222648/Marker.java7
-rw-r--r--tests/bugs162/pr222648/Resource.java5
-rw-r--r--tests/bugs162/pr222648/X.java46
7 files changed, 99 insertions, 0 deletions
diff --git a/tests/bugs162/pr222648/DataAspect.aj b/tests/bugs162/pr222648/DataAspect.aj
new file mode 100644
index 000000000..e1e10803e
--- /dev/null
+++ b/tests/bugs162/pr222648/DataAspect.aj
@@ -0,0 +1,11 @@
+package test;
+
+public aspect DataAspect
+{
+
+ public CONTENT Marker<CONTENT>.getContent()
+ {
+ return null;
+ }
+
+}
diff --git a/tests/bugs162/pr222648/DataInterface.java b/tests/bugs162/pr222648/DataInterface.java
new file mode 100644
index 000000000..76e9b18f8
--- /dev/null
+++ b/tests/bugs162/pr222648/DataInterface.java
@@ -0,0 +1,9 @@
+package test;
+
+public interface DataInterface<CONTENT>
+{
+
+ public CONTENT getContent();
+
+
+}
diff --git a/tests/bugs162/pr222648/Foo.java b/tests/bugs162/pr222648/Foo.java
new file mode 100644
index 000000000..ebf2b0b8b
--- /dev/null
+++ b/tests/bugs162/pr222648/Foo.java
@@ -0,0 +1,12 @@
+package test;
+
+
+
+abstract public class Foo
+< CONTENT extends Resource<CONTENT>,
+ DATA extends DataInterface<CONTENT>
+>
+ extends
+ test.FooBase<DATA>
+{
+}
diff --git a/tests/bugs162/pr222648/FooBase.java b/tests/bugs162/pr222648/FooBase.java
new file mode 100644
index 000000000..e9e0e25b6
--- /dev/null
+++ b/tests/bugs162/pr222648/FooBase.java
@@ -0,0 +1,9 @@
+package test;
+
+
+
+abstract public class FooBase<A>
+{
+}
+
+
diff --git a/tests/bugs162/pr222648/Marker.java b/tests/bugs162/pr222648/Marker.java
new file mode 100644
index 000000000..46718e03e
--- /dev/null
+++ b/tests/bugs162/pr222648/Marker.java
@@ -0,0 +1,7 @@
+package test;
+
+
+
+public interface Marker<CONTENT> extends DataInterface<CONTENT>
+{
+}
diff --git a/tests/bugs162/pr222648/Resource.java b/tests/bugs162/pr222648/Resource.java
new file mode 100644
index 000000000..1a7f938be
--- /dev/null
+++ b/tests/bugs162/pr222648/Resource.java
@@ -0,0 +1,5 @@
+package test;
+
+public interface Resource<RESOURCE>
+{
+}
diff --git a/tests/bugs162/pr222648/X.java b/tests/bugs162/pr222648/X.java
new file mode 100644
index 000000000..451dd70a0
--- /dev/null
+++ b/tests/bugs162/pr222648/X.java
@@ -0,0 +1,46 @@
+
+abstract class FooBase<A> { }
+
+// Existence of this line causes the exception
+abstract class Foo <CC extends Resource, DD extends DataInterface<CC>> extends FooBase<DD> { }
+
+interface DataInterface<CC> {
+ public CC getContent(); // ERR
+}
+
+interface Marker<CC> extends DataInterface<CC> { }
+
+interface Resource { }
+
+aspect DataAspect {
+ // Intertype declaration onto Marker that shares the variable
+ public C Marker<C>.getContent() { // ERR
+ return null;
+ }
+}
+
+/*
+X.java:7 [error] can't override CC DataInterface<CC>.getContent() with CC Marker.getContent() return types don't match
+public CC getContent();
+ ^^^^^^^^^
+
+X.java:16 [error] can't override CC DataInterface<CC>.getContent() with CC Marker.getContent() return types don't match
+public C Marker<C>.getContent() {
+ ^^^^^^^^^
+
+1. Two errors because both source locations reported (stupid code)
+
+
+when failing:
+parent: CC DataInterface<CC>.getContent()
+child : CC Marker.getContent()
+Both return types are type variable reference types (different ones though)
+parent: TypeVar CC extends Resource
+child : CC
+
+So parent discovered the wrong type variable (the wrong CC).
+parent is a ResolvedMemberImpl
+it is considered an 'existingmember' of the type DataInterface<CC>
+
+*/
+