aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authoracolyer <acolyer>2005-03-14 21:39:32 +0000
committeracolyer <acolyer>2005-03-14 21:39:32 +0000
commitf82e6f25e306cefb9278e46df2abd3765582ff36 (patch)
treebb84ae28feb76a57e23180cbdf02dc87ae2b990f /tests
parent6d7638833f88e7a26ac3688c7cda0e617a94be31 (diff)
downloadaspectj-f82e6f25e306cefb9278e46df2abd3765582ff36.tar.gz
aspectj-f82e6f25e306cefb9278e46df2abd3765582ff36.zip
fix for missing syntax error on execution((@XXX *) Foo.new(..))
^^^
Diffstat (limited to 'tests')
-rw-r--r--tests/java5/annotations/SyntaxError.aj21
-rw-r--r--tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java4
-rw-r--r--tests/src/org/aspectj/systemtest/ajc150/ajc150.xml8
3 files changed, 32 insertions, 1 deletions
diff --git a/tests/java5/annotations/SyntaxError.aj b/tests/java5/annotations/SyntaxError.aj
new file mode 100644
index 000000000..ed0085c74
--- /dev/null
+++ b/tests/java5/annotations/SyntaxError.aj
@@ -0,0 +1,21 @@
+public aspect SyntaxError {
+
+ after(Object x) : execution((@Alien *) Passenger+.new(..)) && this(x) {
+ System.out.println("after alien...");
+ }
+
+}
+
+@interface Alien{}
+
+class Passenger {
+
+ @Alien Passenger() {}
+
+}
+
+class SubPassenger extends Passenger {
+
+ @Alien SubPassenger() { super(); }
+
+} \ No newline at end of file
diff --git a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java
index a1aeb6d77..3d75b53c7 100644
--- a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java
@@ -137,6 +137,10 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
runTest("declare soft w. catch block");
}
+ public void testSyntaxError() {
+ runTest("invalid cons syntax");
+ }
+
// helper methods.....
public SyntheticRepository createRepos(File cpentry) {
diff --git a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml
index 2e165f3a8..84e1de484 100644
--- a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml
+++ b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml
@@ -125,7 +125,13 @@
<ajc-test dir="bugs150" title="bad asm for enums" vm="1.5">
<compile files="Rainbow.java" options="-emacssym,-1.5"/>
</ajc-test>
-
+
+ <ajc-test dir="java5/annotations" title="invalid cons syntax" vm="1.5">
+ <compile files="SyntaxError.aj" options="-1.5">
+ <message kind="error" line="3" text="Syntax error on token &quot;new&quot;, &quot;method name (not constructor)&quot; expected"/>
+ </compile>
+ </ajc-test>
+
<!-- Annotation binding tests -->
<ajc-test dir="java5/annotations/binding" vm="1.5" title="call annotation binding 1">