diff options
author | aclement <aclement> | 2009-06-17 22:27:16 +0000 |
---|---|---|
committer | aclement <aclement> | 2009-06-17 22:27:16 +0000 |
commit | f5f0ab28e5746422fdca2ff4119530bd70016f41 (patch) | |
tree | 40bb38572d0c0114ed862548c3540fcf0a176b72 /tests | |
parent | b98b6999e6b030fb550394d182e6368b4d372ed6 (diff) | |
download | aspectj-f5f0ab28e5746422fdca2ff4119530bd70016f41.tar.gz aspectj-f5f0ab28e5746422fdca2ff4119530bd70016f41.zip |
280676: problem 2: allow for target not being generic
Diffstat (limited to 'tests')
4 files changed, 55 insertions, 0 deletions
diff --git a/tests/multiIncremental/pr280676_2/base/src/p/A.java b/tests/multiIncremental/pr280676_2/base/src/p/A.java new file mode 100644 index 000000000..a418f0e6f --- /dev/null +++ b/tests/multiIncremental/pr280676_2/base/src/p/A.java @@ -0,0 +1,12 @@ +package p; + +import java.util.List; + +public class A<N extends Number, T> { + public static void main(String[] args) { + A a = new A(); + List<String> localls = a.ls; + +} +} + diff --git a/tests/multiIncremental/pr280676_2/base/src/p/Foo.aj b/tests/multiIncremental/pr280676_2/base/src/p/Foo.aj new file mode 100644 index 000000000..235672826 --- /dev/null +++ b/tests/multiIncremental/pr280676_2/base/src/p/Foo.aj @@ -0,0 +1,13 @@ +package p; +import java.util.*; + +aspect Foo { + + public int i; + + public List<T> A<Q,T>.ll; + + public List<String> A.ls; + + public void A<Z,X>.m() {} +} diff --git a/tests/multiIncremental/pr280676_2/inc1/src/p/A.java b/tests/multiIncremental/pr280676_2/inc1/src/p/A.java new file mode 100644 index 000000000..8eca89cd3 --- /dev/null +++ b/tests/multiIncremental/pr280676_2/inc1/src/p/A.java @@ -0,0 +1,12 @@ +package p; + +import java.util.List; + +public class A { + public static void main(String[] args) { + A a = new A(); + List<String> localls = a.ls; + +} +} + diff --git a/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java b/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java index 9970435a2..e4261309d 100644 --- a/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java +++ b/tests/src/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java @@ -73,6 +73,24 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa assertNoErrors(p); } + public void testIncrementalGenericItds_pr280676_2() throws Exception { + String p = "pr280676_2"; + initialiseProject(p); + build(p); + checkWasFullBuild(); + assertNoErrors(p); + alter(p, "inc1"); // remove type variables from target type + build(p); + List errors = getErrorMessages(p); + // Build errors: + // error at \src\p\Foo.aj:8::94 The target type for the intertype declaration is not generic + // error at \src\p\Foo.aj:12::154 The target type for the intertype declaration is not generic + // error at \src\p\A.java:0::0 Inconsistent classfile encountered: The undefined type parameter N is referenced from within + // Foo + assertEquals(3, errors.size()); + // *cough* third error, hmmm + } + // TODO (asc) these tests don't actually verify anything! // public void testAtDeclareParents_280658() throws Exception { // AjdeInteractionTestbed.VERBOSE = true; |