Skip to content

Commit

Permalink
Consistent use of JavacResolution.typeToJCTree instead of TreeMaker.T…
Browse files Browse the repository at this point in the history
…ypes - fixes issue 341 where use of @DeleGate with T-extends type parameters would prepend a dot to the fully qualified classname.
  • Loading branch information
askoning committed Feb 27, 2012
1 parent dbc46ee commit 786a6ff
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/core/lombok/javac/handlers/HandleDelegate.java
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,13 @@ private JCMethodDecl createDelegateMethod(MethodSig sig, JavacNode annotation, N

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));
}

Expand Down

0 comments on commit 786a6ff

Please sign in to comment.