~ubuntu-branches/ubuntu/natty/aspectj/natty

« back to all changes in this revision

Viewing changes to org.aspectj/modules/tests/bugs150/pr115250_2.aj

  • Committer: Bazaar Package Importer
  • Author(s): Damien Raude-Morvan
  • Date: 2009-10-04 16:37:23 UTC
  • mfrom: (1.1.3 upstream) (3.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20091004163723-ck4y7j7fhjxskkie
Tags: 1.6.6+dfsg-1
* New upstream release.
  - Update 02_use_gjdoc.diff patch
* Update my email address

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
public class pr115250_2 {
2
 
        public static void main(String[] args) {
3
 
                new C().foo();
4
 
        }
5
 
 
6
 
        static class C {
7
 
        C foo() { return null; }
8
 
        }
9
 
 
10
 
        // properly get compiler error wrt return type of join point
11
 
        static aspect Normal {
12
 
                C around() : execution(* C.foo()) {
13
 
                        return proceed();
14
 
                }
15
 
        }
16
 
        
17
 
        
18
 
        // no compiler error wrt return type of join point
19
 
        
20
 
        static abstract aspect SS<Target> {
21
 
                abstract protected pointcut exec();
22
 
                Target around() : exec() { // expect CE for execution(C.new());
23
 
                        System.err.println("funky advice running");
24
 
                        return proceed(); 
25
 
                }
26
 
        }
27
 
        
28
 
        static aspect A extends SS<C> {
29
 
                protected pointcut exec() : execution(* C.foo());
30
 
        }
31
 
}