aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs150
diff options
context:
space:
mode:
authoracolyer <acolyer>2005-09-02 13:45:25 +0000
committeracolyer <acolyer>2005-09-02 13:45:25 +0000
commite29ca524955b2112bbf63e740ca71516c13fbb4c (patch)
treec6be1b77f9071cb24cdba1e2cf91f325c90ce9e1 /tests/bugs150
parent047173e8683e4ab9004ae2151a8abad886d1b84b (diff)
downloadaspectj-e29ca524955b2112bbf63e740ca71516c13fbb4c.tar.gz
aspectj-e29ca524955b2112bbf63e740ca71516c13fbb4c.zip
tests and fix for pr1202212 - poor job of testing modifiers on ITD methods
Diffstat (limited to 'tests/bugs150')
-rw-r--r--tests/bugs150/pr102212.aj22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/bugs150/pr102212.aj b/tests/bugs150/pr102212.aj
new file mode 100644
index 000000000..04c754d6c
--- /dev/null
+++ b/tests/bugs150/pr102212.aj
@@ -0,0 +1,22 @@
+interface Interface {}
+abstract class Parent {}
+class Child extends Parent implements Interface {}
+
+public aspect pr102212 {
+ // illegal modifier combination not caught by ajc
+ public abstract synchronized void Parent._abstract();
+
+ public synchronized void Child._abstract() {}
+
+
+ // the following is legal - it's a default implementation....
+ public /* implicit abstract */ synchronized void Interface._interface() {}
+
+
+ // use Child to make java complain: "illegal modifiers: 0x421"
+ // (this corresponds to "public abstract synchronized")
+ public static void main(String[] args) {
+ new Child();
+ }
+}
+