}
SourceTypeBinding sourceType = s.referenceContext.binding;
+ // test classes don't extend aspects
+ if (sourceType.superclass != null) {
+ ResolvedTypeX parent = factory.fromEclipse(sourceType.superclass);
+ if (parent.isAspect() && !(dec instanceof AspectDeclaration)) {
+ factory.showMessage(IMessage.ERROR, "class \'" + new String(sourceType.sourceName) +
+ "\' can not extend aspect \'" + parent.getName() + "\'",
+ factory.fromEclipse(sourceType).getSourceLocation(), null);
+ }
+ }
ReferenceBinding[] memberTypes = sourceType.memberTypes;
for (int i = 0, length = memberTypes.length; i < length; i++) {
<message kind="error" line="6"/>
</compile>
</ajc-test>
+
+ <ajc-test dir="errors" keywords="error"
+ title="class extending abstract aspect">
+ <compile files="ClassExtendingAbstractAspectCE.java">
+ <message kind="error" line="20"/>
+ </compile>
+ </ajc-test>
</suite>
</compile>
</ajc-test>
- <ajc-test dir="errors" keywords="error"
- title="class extending abstract aspect">
- <compile files="ClassExtendingAbstractAspectCE.java">
- <message kind="error" line="20"/>
- </compile>
- </ajc-test>
-
<ajc-test dir="incremental/stringliteral"
title="incrementally change string size and wire in injar classes">
<compile staging="true" options="-incremental"
before main packageOne.Main"/>
</ajc-test>
+ <!-- The correct behavior of this case needs to be thought through -->
<ajc-test dir="bugs" pr="34206"
title="before():execution(new(..)) does not throw NoAspectBoundException">
<compile files="AspectInitError.java"/>
<!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd">
<suite>
-
-
-
<!--
<ajc-test dir="new" pr="885"