镜像自地址
https://github.com/eclipse-aspectj/aspectj.git
已同步 2024-08-14 02:10:40 +02:00
23 行
447 B
Java
23 行
447 B
Java
|
|
import org.aspectj.testing.Tester;
|
|
|
|
/** @testcase PR#884 declare constructor on interface subclasses */
|
|
public class DeclareInterfaceConstructor {
|
|
public static void main(String[] args) {
|
|
X x = new Z(1);
|
|
if (1 != x.i) {
|
|
Tester.check(false, "bad constructor initialization");
|
|
}
|
|
}
|
|
}
|
|
|
|
interface X {}
|
|
|
|
class Z implements X {}
|
|
|
|
aspect Y {
|
|
public int X.i;
|
|
public X+.new(final int i) {this.i = i;}
|
|
}
|
|
|