aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs150
diff options
context:
space:
mode:
authoracolyer <acolyer>2005-11-04 13:13:09 +0000
committeracolyer <acolyer>2005-11-04 13:13:09 +0000
commit6104d89dfa9af6f7f1f1853e04b498d5ea60a1c8 (patch)
tree2b3232b153e1166c738e2b361cc128c918e20b70 /tests/bugs150
parent78569b96815838515cb9c9bc8ab528149a89af00 (diff)
downloadaspectj-6104d89dfa9af6f7f1f1853e04b498d5ea60a1c8.tar.gz
aspectj-6104d89dfa9af6f7f1f1853e04b498d5ea60a1c8.zip
tests for pr73050 :- support for isAnonymous and name pattern matching that now only matches "*" against anonymous types
Diffstat (limited to 'tests/bugs150')
-rw-r--r--tests/bugs150/Pr73050.aj20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/bugs150/Pr73050.aj b/tests/bugs150/Pr73050.aj
new file mode 100644
index 000000000..ed0168c60
--- /dev/null
+++ b/tests/bugs150/Pr73050.aj
@@ -0,0 +1,20 @@
+public aspect Pr73050 {
+
+ pointcut anonymousTypeMatchedByNamePattern() :
+ staticinitialization(Pr73050.*1*);
+
+ pointcut anonymousTypeMatchedByWildCard() :
+ staticinitialization(Pr73050.*);
+
+ declare warning : anonymousTypeMatchedByNamePattern() :
+ "anonymous types shouldn't be matched by name patterns";
+
+ declare warning : anonymousTypeMatchedByWildCard() :
+ "anonymous types should be matched by a * wild card";
+
+ public void foo() {
+ (new Runnable() {
+ public void run() {}
+ }).run();
+ }
+} \ No newline at end of file