The introduction on interface causes the interface implementation class error
(testcase now expects the error text)
interface I {}
aspect A {
- abstract int I.getInt(); // implicitly public
+ abstract int I.getInt(); // Error expected: Needs to be public
before() : execution(int getInt()) && target(I) {
Tester.event("before-execution");
}
pr="49784"
title="aspect declares interface method (abstract)">
<compile files="InterfaceMethodDeclarationAbstract.java">
- <message kind="error" line="40" text="must implement" />
+ <message kind="error" line="40" text="abstract intertype method declaration 'int I.getInt()' on interface I must be declared public (compiler limitation)" />
</compile>
</ajc-test>