summaryrefslogtreecommitdiffstats
path: root/org.aspectj.ajdt.core/src
diff options
context:
space:
mode:
authoraclement <aclement>2005-10-04 13:37:01 +0000
committeraclement <aclement>2005-10-04 13:37:01 +0000
commit32a02ec2a3e15651249d5d7cc5f63fa409468b2a (patch)
tree99219854182c1d1cd492f3c27eeb4ce75673448c /org.aspectj.ajdt.core/src
parent1ee6fbfbdc453e0d9ba2ee1e2951499f0fb9fef3 (diff)
downloadaspectj-32a02ec2a3e15651249d5d7cc5f63fa409468b2a.tar.gz
aspectj-32a02ec2a3e15651249d5d7cc5f63fa409468b2a.zip
test and fix for pr110906: vararg ITDs
Diffstat (limited to 'org.aspectj.ajdt.core/src')
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeMethodDeclaration.java6
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java5
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseTypeMunger.java2
3 files changed, 9 insertions, 4 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeMethodDeclaration.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeMethodDeclaration.java
index 859704441..2ef5cc7e1 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeMethodDeclaration.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeMethodDeclaration.java
@@ -35,6 +35,7 @@ import org.aspectj.org.eclipse.jdt.internal.compiler.parser.Parser;
import org.aspectj.org.eclipse.jdt.internal.compiler.problem.AbortCompilationUnit;
import org.aspectj.weaver.AjAttribute;
import org.aspectj.weaver.AjcMemberMaker;
+import org.aspectj.weaver.Constants;
import org.aspectj.weaver.NameMangler;
import org.aspectj.weaver.NewMethodTypeMunger;
import org.aspectj.weaver.ResolvedMember;
@@ -188,8 +189,9 @@ public class InterTypeMethodDeclaration extends InterTypeDeclaration {
// referred to in the parameters/returntype
ResolvedMember sig = world.makeResolvedMember(binding,onTypeBinding);
sig.resetName(new String(declaredSelector));
- sig.resetModifiers(declaredModifiers);
-
+ int resetModifiers = declaredModifiers;
+ if (binding.isVarargs()) resetModifiers = resetModifiers | Constants.ACC_VARARGS;
+ sig.resetModifiers(resetModifiers);
NewMethodTypeMunger myMunger = new NewMethodTypeMunger(sig, null);
setMunger(myMunger);
ResolvedType aspectType = world.fromEclipse(classScope.referenceContext.binding);
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java
index 68858e92e..4eb290647 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java
@@ -449,7 +449,7 @@ public class EclipseFactory {
// AMC these next two lines shouldn't be needed once we sort out generic types properly in the world map
ResolvedType realDeclaringType = world.resolve(fromBinding(declaringType));
if (realDeclaringType.isRawType()) realDeclaringType = realDeclaringType.getGenericType();
- ResolvedMember ret = new ResolvedMemberImpl(
+ ResolvedMemberImpl ret = new ResolvedMemberImpl(
binding.isConstructor() ? Member.CONSTRUCTOR : Member.METHOD,
realDeclaringType,
binding.modifiers,
@@ -458,6 +458,9 @@ public class EclipseFactory {
fromBindings(binding.parameters),
fromBindings(binding.thrownExceptions)
);
+ if (binding.isVarargs()) {
+ ret.setVarargsMethod();
+ }
if (typeVariablesForThisMember.size()!=0) {
UnresolvedType[] tvars = new UnresolvedType[typeVariablesForThisMember.size()];
int i =0;
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseTypeMunger.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseTypeMunger.java
index e499f2df5..8f7b1544f 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseTypeMunger.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseTypeMunger.java
@@ -131,7 +131,7 @@ public class EclipseTypeMunger extends ConcreteTypeMunger {
binding.modifiers = (binding.modifiers & (IConstants.AccPublic | IConstants.AccProtected | IConstants.AccPrivate));
if (isAbstract) binding.modifiers |= IConstants.AccAbstract;
}
-
+ if (munger.getSignature().isVarargsMethod()) binding.modifiers |= IConstants.AccVarargs;
findOrCreateInterTypeMemberFinder(sourceType).addInterTypeMethod(binding);
return true;
}