View | Details | Raw Unified | Return to bug 111915
Collapse All | Expand All

(-)src/org/aspectj/systemtest/ajc150/Ajc150Tests.java (+4 lines)
Lines 600-605 Link Here
600
	  runTest("ITD varargs in constructor");
600
	  runTest("ITD varargs in constructor");
601
  }
601
  }
602
  
602
  
603
  public void testIllegalChangeToPointcutDeclaration_pr111915() {
604
	  runTest("test illegal change to pointcut declaration");
605
  }
606
  
603
  // helper methods.....
607
  // helper methods.....
604
  
608
  
605
  public SyntheticRepository createRepos(File cpentry) {
609
  public SyntheticRepository createRepos(File cpentry) {
(-)src/org/aspectj/systemtest/ajc150/ajc150.xml (+5 lines)
Lines 660-665 Link Here
660
        </compile>
660
        </compile>
661
    </ajc-test> 
661
    </ajc-test> 
662
662
663
    <ajc-test dir="bugs150" title="test illegal change to pointcut declaration">
664
        <compile files="pr111915.java" options="-1.5">
665
        </compile>
666
    </ajc-test> 
667
663
668
664
    <!-- ============================================================================ -->
669
    <!-- ============================================================================ -->
665
    <!-- ============================================================================ -->
670
    <!-- ============================================================================ -->
(-)bugs150/pr111915.java (+45 lines)
Added Link Here
1
class SomeClass {
2
3
    public void doSomething() {
4
    }
5
6
    public static void main(String... args) {
7
        new SomeClass().doSomething();
8
    }
9
10
}
11
12
aspect MyAspect {
13
14
    public interface MyWorld {
15
    }
16
17
    declare parents : SomeClass implements MyWorld;
18
19
    pointcut doSomethingInMyWorld(MyWorld myWorld) :
20
            execution(void SomeClass.doSomething()) &&
21
            this(myWorld);
22
23
    void around(MyWorld myWorld) : doSomethingInMyWorld(myWorld) {
24
        System.out.println("this works");
25
    }
26
27
}
28
29
aspect DoesntCompile {
30
31
    public interface MyWorld {
32
    }
33
34
    declare parents : SomeClass implements MyWorld;
35
36
    pointcut doSomething(SomeClass someClass) :
37
            execution(void SomeClass.doSomething()) &&
38
            this(someClass);
39
40
    pointcut doSomethingInMyWorld(MyWorld myWorld) : doSomething(myWorld);
41
42
    void around(MyWorld myWorld) : doSomethingInMyWorld(myWorld) {
43
    }
44
45
}

Return to bug 111915