From 73c305bb7af6382c09caf5795a39b3ac96439b9f Mon Sep 17 00:00:00 2001 From: aclement Date: Mon, 16 Mar 2009 18:40:24 +0000 Subject: [PATCH] 268710: test and fix: marker interface within generic aspect --- .../ajdt/internal/compiler/ast/PointcutDesignator.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/PointcutDesignator.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/PointcutDesignator.java index 4feafc640..d9e6094fa 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/PointcutDesignator.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/PointcutDesignator.java @@ -22,6 +22,7 @@ import org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration; import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.MethodBinding; import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding; import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.TypeBinding; +import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.TypeVariableBinding; import org.aspectj.org.eclipse.jdt.internal.compiler.parser.Parser; import org.aspectj.weaver.UnresolvedType; import org.aspectj.weaver.patterns.FormalBinding; @@ -75,6 +76,13 @@ public class PointcutDesignator extends ASTNode { Argument arg = arguments[i]; String name = new String(arg.name); UnresolvedType type = world.fromBinding(parameters[i]); + // pr268710: allow for inner interfaces in a generic aspect + if (parameters[i].isInterface() && parameters[i].isParameterizedType() && parameters[i].isMemberType()) { + TypeVariableBinding[] tvs = parameters[i].typeVariables(); + if (tvs == null || tvs.length == 0) { + type = type.getRawType(); + } + } bindings[i] = new FormalBinding(type, name, i, arg.sourceStart, arg.sourceEnd); } -- 2.39.5