aboutsummaryrefslogtreecommitdiffstats
path: root/weaver
diff options
context:
space:
mode:
authorjhugunin <jhugunin>2002-12-30 20:30:48 +0000
committerjhugunin <jhugunin>2002-12-30 20:30:48 +0000
commit580d0ccb31b25769510283e93174915f76b06d09 (patch)
tree463e82d2d0fd6cfe1e881e15fb55960195bed3ed /weaver
parent2a76e2727ab817e2e7af3676511a87c08809de97 (diff)
downloadaspectj-580d0ccb31b25769510283e93174915f76b06d09.tar.gz
aspectj-580d0ccb31b25769510283e93174915f76b06d09.zip
better errors for circularities
Diffstat (limited to 'weaver')
-rw-r--r--weaver/src/org/aspectj/weaver/patterns/DeclareDominates.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/weaver/src/org/aspectj/weaver/patterns/DeclareDominates.java b/weaver/src/org/aspectj/weaver/patterns/DeclareDominates.java
index 23b0a45f2..87eed741d 100644
--- a/weaver/src/org/aspectj/weaver/patterns/DeclareDominates.java
+++ b/weaver/src/org/aspectj/weaver/patterns/DeclareDominates.java
@@ -16,6 +16,7 @@ package org.aspectj.weaver.patterns;
import java.io.*;
import java.util.List;
+import org.aspectj.bridge.IMessage;
import org.aspectj.weaver.*;
import org.aspectj.weaver.ResolvedTypeX;
@@ -77,9 +78,12 @@ public class DeclareDominates extends Declare {
TypePattern p = patterns.get(i);
if (p.isStar()) {
starMatch = i;
- } else if (p.matchesExactly(a)) {
+ } else if (p.matchesStatically(a)) {
if (knownMatch != -1) {
- throw new BCException("multiple matches: " + this + " with " + a);
+ a.getWorld().showMessage(IMessage.ERROR, "multiple matches for " + a +
+ ", matches both " + patterns.get(knownMatch) + " and " + p,
+ patterns.get(knownMatch).getSourceLocation(), p.getSourceLocation());
+ return -1;
} else {
knownMatch = i;
}