Fixed issue 399: @ExtensionMethod broken for javac in nearly all cases

This commit is contained in:
Philipp Eichhorn committed 2012-07-13 15:27:52 +02:00
1 parent 02446794b0
commit 06826342f3
1 file changed
+1 -5
@@ -55,7 +55,6 @@ import com.sun.tools.javac.tree.JCTree.JCExpression;
import com.sun.tools.javac.tree.JCTree.JCFieldAccess;
import com.sun.tools.javac.tree.JCTree.JCIdent;
import com.sun.tools.javac.tree.JCTree.JCMethodInvocation;
import com.sun.tools.javac.tree.TreeMaker;
/**
* Handles the {@link ExtensionMethod} annotation for javac.
@@ -180,10 +179,7 @@ public class HandleExtensionMethod extends JavacAnnotationHandler<ExtensionMetho
Type firstArgType = types.erasure(extensionMethodType.asMethodType().argtypes.get(0));
if (!types.isAssignable(receiverType, firstArgType)) continue;
methodCall.args = methodCall.args.prepend(receiver);
TreeMaker maker = annotationNode.getTreeMaker();
JCIdent extensionClassIdent = maker.Ident(annotationNode.toName(extensionProvider.toString()));
methodCall.meth = maker.Select(extensionClassIdent, annotationNode.toName(methodName));
methodCall.meth = chainDotsString(annotationNode, extensionProvider.toString() + "." + methodName);
return;
}
}