diff options
author | aclement <aclement> | 2006-03-16 11:01:54 +0000 |
---|---|---|
committer | aclement <aclement> | 2006-03-16 11:01:54 +0000 |
commit | f2cd94f88a9976fc98786955a764522a8ccb37f1 (patch) | |
tree | f65554a4be1e85ad6a171626db3192d40dab88d2 /tests | |
parent | 973062a23697bf53ef926ff0235e2b85e5dc550d (diff) | |
download | aspectj-f2cd94f88a9976fc98786955a764522a8ccb37f1.tar.gz aspectj-f2cd94f88a9976fc98786955a764522a8ccb37f1.zip |
test and fix for 131933
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bugs151/pr131933.aj | 11 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc151/Ajc151Tests.java | 5 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc151/ajc151.xml | 7 |
3 files changed, 23 insertions, 0 deletions
diff --git a/tests/bugs151/pr131933.aj b/tests/bugs151/pr131933.aj new file mode 100644 index 000000000..a374c13af --- /dev/null +++ b/tests/bugs151/pr131933.aj @@ -0,0 +1,11 @@ +import java.util.List; + +aspect Slide71 { + before(): GenericType<String>.foo() {} + before(): GenericType<MyList>.foo() {} + //before(): GenericType.foo() {} +} + +class GenericType<T> { + public pointcut foo(): execution(* T.*(..)); +} diff --git a/tests/src/org/aspectj/systemtest/ajc151/Ajc151Tests.java b/tests/src/org/aspectj/systemtest/ajc151/Ajc151Tests.java index 49ccd33c5..c431e763a 100644 --- a/tests/src/org/aspectj/systemtest/ajc151/Ajc151Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc151/Ajc151Tests.java @@ -107,6 +107,11 @@ public class Ajc151Tests extends org.aspectj.testing.XMLBasedAjcTestCase { public void testSwallowedExceptionIgnored() { runTest("swallowed exceptions with xlint"); } + + public void testGenericAspectWithUnknownType_pr131933() { + runTest("no ClassCastException with generic aspect and unknown type"); + } + /* * @AspectJ bugs and enhancements */ diff --git a/tests/src/org/aspectj/systemtest/ajc151/ajc151.xml b/tests/src/org/aspectj/systemtest/ajc151/ajc151.xml index f935c4da9..129c1b434 100644 --- a/tests/src/org/aspectj/systemtest/ajc151/ajc151.xml +++ b/tests/src/org/aspectj/systemtest/ajc151/ajc151.xml @@ -246,6 +246,13 @@ </compile> </ajc-test> + <ajc-test dir="bugs151" title="no ClassCastException with generic aspect and unknown type"> + <compile files="pr131933.aj" options="-1.5"> + <message kind="error" line="5" text="can't bind type name 'MyList'"/> + </compile> + </ajc-test> + + <!-- New features down here... when they arent big enough to have their own test file --> <ajc-test dir="features151/ptw" title="exposing withintype"> |