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

« back to all changes in this revision

Viewing changes to org.aspectj/modules/tests/new/DeclareInterfaceConstructor.java

  • 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
 
 
2
 
import org.aspectj.testing.Tester;
3
 
 
4
 
/** @testcase PR#884 declare constructor on interface subclasses */
5
 
public class DeclareInterfaceConstructor {
6
 
    public static void main(String[] args) {
7
 
        X x = new Z(1);
8
 
        if (1 != x.i) {
9
 
            Tester.check(false, "bad constructor initialization");
10
 
        }
11
 
    }
12
 
}
13
 
 
14
 
interface X {}
15
 
 
16
 
class Z implements X {}
17
 
 
18
 
aspect Y {
19
 
    public int X.i;
20
 
    public X+.new(final int i) {this.i = i;}
21
 
}
22