diff options
author | acolyer <acolyer> | 2005-03-23 12:48:10 +0000 |
---|---|---|
committer | acolyer <acolyer> | 2005-03-23 12:48:10 +0000 |
commit | 13a88313eac9573418a047f59d2b8e8e5bbb8c1c (patch) | |
tree | c8f31335d9df164bded347a335f310243c9e4173 /weaver | |
parent | 8c80fde9d4d3c7c2d913da377f8fb2de6e4bf854 (diff) | |
download | aspectj-13a88313eac9573418a047f59d2b8e8e5bbb8c1c.tar.gz aspectj-13a88313eac9573418a047f59d2b8e8e5bbb8c1c.zip |
test and fix for handling a *... varargs pattern
Diffstat (limited to 'weaver')
-rw-r--r-- | weaver/src/org/aspectj/weaver/patterns/PatternParser.java | 2 | ||||
-rw-r--r-- | weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/weaver/src/org/aspectj/weaver/patterns/PatternParser.java b/weaver/src/org/aspectj/weaver/patterns/PatternParser.java index 91f32baba..1463534c3 100644 --- a/weaver/src/org/aspectj/weaver/patterns/PatternParser.java +++ b/weaver/src/org/aspectj/weaver/patterns/PatternParser.java @@ -644,7 +644,7 @@ public class PatternParser { int endPos = tokenSource.peek(-1).getEnd(); //??? what about the source location of any's???? - if (names.size() == 1 && ((NamePattern)names.get(0)).isAny() && dim == 0) return TypePattern.ANY; + if (names.size() == 1 && ((NamePattern)names.get(0)).isAny() && dim == 0 && !isVarArgs) return TypePattern.ANY; // Notice we increase the dimensions if varargs is set. this is to allow type matching to // succeed later: The actual signature at runtime of a method declared varargs is an array type of diff --git a/weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java b/weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java index 859391bdf..fd2ec4896 100644 --- a/weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java +++ b/weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java @@ -387,7 +387,7 @@ public class WildTypePattern extends TypePattern { // use a special variant of Any TypePattern called // AnyWithAnnotation if (annotationPattern == AnnotationTypePattern.ANY) { - if (dim == 0) { // pr72531 + if (dim == 0 && !isVarArgs) { // pr72531 return TypePattern.ANY; //??? loses source location } } else { |