<run class="CflowConcrete"/>
</ajc-test>
+ <ajc-test dir="new/options11" pr="36329"
+ comment="the line number might change, we're really interested only in the files here"
+ title="The compiler crashes when using aspect libraries created without using -noweave">
+ <compile files="Main.java,injar.jar,Aspect.java,aspectlib1.jar,aspectlib2.jar">
+ <message kind="error" line="0"/>
+ </compile>
+ </ajc-test>
+
+ <ajc-test dir="bugs" title="lame error message: negation doesn't allow binding"
+ pr="30663">
+ <compile files="BadBindingError.java">
+ <message kind="error" line="7"/>
+ </compile>
+ </ajc-test>
+
+ <ajc-test dir="bugs/interSpecials" pr="36936"
+ title="Error when introducing members of type Class">
+ <compile files="Trg.java,Asp.java"/>
+ <run class="Trg"/>
+ </ajc-test>
</suite>
--- /dev/null
+// Bugzilla Bug 30663
+//lame error message: "negation doesn't allow binding"
+
+import org.aspectj.testing.Tester;
+
+public aspect BadBindingError {
+ pointcut p(int i): call(void f(i));
+}
<!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd">
-<suite>
+<suite>
<!--
-
+ <ajc-test dir="options/injars/simple"
+ title="options -injars">
+ <compile files="Simple.java,main.jar"
+ options="!eclipse"/>
+ <run class="Main"/>
+ </ajc-test>
<ajc-test dir="new" pr="885"
import org.apache.bcel.generic.ReturnInstruction;
import org.apache.bcel.generic.Select;
import org.apache.bcel.generic.Type;
+import org.aspectj.bridge.IMessage;
import org.aspectj.util.PartialOrder;
import org.aspectj.weaver.AjAttribute;
import org.aspectj.weaver.AjcMemberMaker;
public boolean weave() {
if (clazz.getWeaverState().isWoven()) {
- throw new RuntimeException("already woven: " + clazz);
+ world.showMessage(IMessage.ERROR,
+ "class \'" + clazz.getType().getName() + "\' is already woven",
+ ty.getSourceLocation(), null);
+ return false;
}
boolean isChanged = false;
public final FuzzyBoolean matches(ResolvedTypeX type, MatchKind kind) {
+ //??? This is part of gracefully handling missing references
+ if (type == ResolvedTypeX.MISSING) return FuzzyBoolean.NO;
+
if (kind == STATIC) {
return FuzzyBoolean.fromBoolean(matchesStatically(type));
} else if (kind == DYNAMIC) {
if (simpleName != null) {
FormalBinding formalBinding = scope.lookupFormal(simpleName);
if (formalBinding != null) {
- if (!allowBinding || bindings == null) {
+ if (bindings == null) {
scope.message(IMessage.ERROR, this, "negation doesn't allow binding");
return this;
}
+ if (!allowBinding) {
+ scope.message(IMessage.ERROR, this,
+ "name binding only allowed in target, this, and args pcds");
+ return this;
+ }
+
BindingTypePattern binding = new BindingTypePattern(formalBinding);
binding.copyLocationFrom(this);
bindings.register(binding, scope);