From 13a88313eac9573418a047f59d2b8e8e5bbb8c1c Mon Sep 17 00:00:00 2001 From: acolyer Date: Wed, 23 Mar 2005 12:48:10 +0000 Subject: test and fix for handling a *... varargs pattern --- weaver/src/org/aspectj/weaver/patterns/PatternParser.java | 2 +- weaver/src/org/aspectj/weaver/patterns/WildTypePattern.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'weaver') 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 { -- cgit v1.2.3