Consistent use of JavacResolution.typeToJCTree instead of TreeMaker.Types - fixes issue 341 where use of @Delegate with T-extends type parameters would prepend a dot to the fully qualified classname.

This commit is contained in:
Sander Koning committed 2012-02-27 21:48:31 +01:00
1 parent dbc46eefed
commit 786a6ffd23
1 file changed
+7 -1
@@ -288,7 +288,13 @@ public class HandleDelegate extends JavacAnnotationHandler<Delegate> {
for (TypeMirror param : sig.type.getTypeVariables()) {
Name name = ((TypeVar) param).tsym.name;
typeParams.append(maker.TypeParameter(name, maker.Types(types.getBounds((TypeVar) param))));
ListBuffer<JCExpression> bounds = types.getBounds((TypeVar) param).isEmpty() ? null : new ListBuffer<JCExpression>();
for (Type type : types.getBounds((TypeVar) param)) {
bounds.append(JavacResolution.typeToJCTree(type, annotation.getAst(), true));
}
typeParams.append(maker.TypeParameter(name, bounds.toList()));
typeArgs.append(maker.Ident(name));
}