diff options
author | aclement <aclement> | 2005-11-14 10:38:47 +0000 |
---|---|---|
committer | aclement <aclement> | 2005-11-14 10:38:47 +0000 |
commit | 4b8bed7cff98b2aca5586e604a138c3674453c90 (patch) | |
tree | 0016fd8d134513859d3cc8f911e07958f72c4fd1 /tests/bugs150 | |
parent | 563ab1bc7659edf2d42bed64f131b2a6df1ac56a (diff) | |
download | aspectj-4b8bed7cff98b2aca5586e604a138c3674453c90.tar.gz aspectj-4b8bed7cff98b2aca5586e604a138c3674453c90.zip |
tests and fixes for 115235: stackoverflow on concretizing pointcuts (patch from Helen)
Diffstat (limited to 'tests/bugs150')
-rw-r--r-- | tests/bugs150/pr115235.aj | 22 | ||||
-rw-r--r-- | tests/bugs150/pr115235b.aj | 28 |
2 files changed, 50 insertions, 0 deletions
diff --git a/tests/bugs150/pr115235.aj b/tests/bugs150/pr115235.aj new file mode 100644 index 000000000..1d855e3cb --- /dev/null +++ b/tests/bugs150/pr115235.aj @@ -0,0 +1,22 @@ +abstract aspect GenericAbstractAspect<T>{ + abstract protected pointcut pc(); + before() : pc() {} +} + +aspect Concrete extends GenericAbstractAspect<Concrete> { + // should get circular dependency error message from this + protected pointcut pc() : pc(); +} + +aspect Concrete2 extends GenericAbstractAspect<Concrete2> { + // this should compile as expected + protected pointcut pc() : p1(); + pointcut p1() : call(void Concrete2.foo(..)); +} + +aspect Concrete3 extends GenericAbstractAspect<Concrete3> { + // should get circular dependency error message from this + protected pointcut pc() : pc1(); + pointcut pc1() : pc2(); + pointcut pc2() : pc(); +} diff --git a/tests/bugs150/pr115235b.aj b/tests/bugs150/pr115235b.aj new file mode 100644 index 000000000..5427debe8 --- /dev/null +++ b/tests/bugs150/pr115235b.aj @@ -0,0 +1,28 @@ +abstract aspect GenericAbstractAspect<T> { + abstract protected pointcut pc(); + before() : pc() {} +} + +abstract aspect SubGenericAspect<T> extends GenericAbstractAspect<T> { + abstract protected pointcut pc1(); + abstract protected pointcut pc3(); + + protected pointcut pc() : pc1(); + protected pointcut pc2() : pc3(); +} + +// this should compile with no errors +aspect Concrete2 extends SubGenericAspect<String> { + protected pointcut pc() : pc1(); + protected pointcut pc1() :pc3(); + protected pointcut pc3() : execution(* *(String)); +} + +class C { + + public void method(String s) { + } + + public void method2(int i) { + } +} |