peichhorn/lombok-pg — Issue #61: javac extension method issue
Author: nicholas22
Created: 2011-12-06 11:32:50+00:00
State: open
Labels: Bug, Javac

Can't get some classes to compile when using extension methods:

[javac] java.lang.IllegalArgumentException
[javac] at lombok.javac.handlers.Javac.typeNodeOf(Javac.java:155)
[javac] at lombok.javac.handlers.ast.JavacType.typeOf(JavacType.java:304)
[javac] at lombok.javac.handlers.HandleExtensionMethod$ExtensionMethodReplaceVisitor.handleMethodCall(HandleExtensionMethod.java:154)
[javac] at lombok.javac.handlers.HandleExtensionMethod$ExtensionMethodReplaceVisitor.visitMethodInvocation(HandleExtensionMethod.java:148)
[javac] at lombok.javac.handlers.HandleExtensionMethod$ExtensionMethodReplaceVisitor.visitMethodInvocation(HandleExtensionMethod.java:136)
[javac] at com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1222)
[javac] at com.sun.source.util.TreeScanner.scan(TreeScanner.java:61)
[javac] at com.sun.source.util.TreeScanner.visitExpressionStatement(TreeScanner.java:223)
[javac] at com.sun.tools.javac.tree.JCTree$JCExpressionStatement.accept(JCTree.java:1080)
[javac] at com.sun.source.util.TreeScanner.scan(TreeScanner.java:61)
[javac] at com.sun.source.util.TreeScanner.scan(TreeScanner.java:75)
[javac] at com.sun.source.util.TreeScanner.visitBlock(TreeScanner.java:143)
[javac] at com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:748)
[javac] at com.sun.source.util.TreeScanner.scan(TreeScanner.java:61)
[javac] at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:65)
[javac] at com.sun.source.util.TreeScanner.visitMethod(TreeScanner.java:127)
[javac] at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:660)
[javac] at com.sun.source.util.TreeScanner.scan(TreeScanner.java:61)
[javac] at com.sun.source.util.TreeScanner.scan(TreeScanner.java:75)
[javac] at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:83)
[javac] at com.sun.source.util.TreeScanner.visitClass(TreeScanner.java:117)
[javac] at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:592)
[javac] at com.sun.source.util.TreeScanner.scan(TreeScanner.java:61)
[javac] at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:65)
[javac] at com.sun.source.util.TreeScanner.visitNewClass(TreeScanner.java:260)
[javac] at com.sun.tools.javac.tree.JCTree$JCNewClass.accept(JCTree.java:1273)
[javac] at com.sun.source.util.TreeScanner.scan(TreeScanner.java:61)
[javac] at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:65)
[javac] at com.sun.source.util.TreeScanner.scan(TreeScanner.java:75)
[javac] at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:83)
[javac] at com.sun.source.util.TreeScanner.visitMethodInvocation(TreeScanner.java:251)
[javac] at lombok.javac.handlers.HandleExtensionMethod$ExtensionMethodReplaceVisitor.visitMethodInvocation(HandleExtensionMethod.java:149)
[javac] at lombok.javac.handlers.HandleExtensionMethod$ExtensionMethodReplaceVisitor.visitMethodInvocation(HandleExtensionMethod.java:136)
[javac] at com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1222)
[javac] at com.sun.source.util.TreeScanner.scan(TreeScanner.java:61)
[javac] at com.sun.source.util.TreeScanner.visitReturn(TreeScanner.java:235)
[javac] at com.sun.tools.javac.tree.JCTree$JCReturn.accept(JCTree.java:1144)
[javac] at com.sun.source.util.TreeScanner.scan(TreeScanner.java:61)
[javac] at com.sun.source.util.TreeScanner.scan(TreeScanner.java:75)
[javac] at com.sun.source.util.TreeScanner.visitBlock(TreeScanner.java:143)
[javac] at com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:748)
[javac] at com.sun.source.util.TreeScanner.scan(TreeScanner.java:61)
[javac] at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:65)
[javac] at com.sun.source.util.TreeScanner.visitMethod(TreeScanner.java:127)
[javac] at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:660)
[javac] at com.sun.source.util.TreeScanner.scan(TreeScanner.java:61)
[javac] at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:65)
[javac] at com.sun.source.util.TreeScanner.scan(TreeScanner.java:75)
[javac] at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:83)
[javac] at com.sun.source.util.TreeScanner.visitClass(TreeScanner.java:117)
[javac] at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:592)
[javac] at lombok.javac.handlers.HandleExtensionMethod$ExtensionMethodReplaceVisitor.replace(HandleExtensionMethod.java:143)
[javac] at lombok.javac.handlers.HandleExtensionMethod.handle(HandleExtensionMethod.java:95)
[javac] at lombok.javac.HandlerLibrary$AnnotationHandlerContainer.handle(HandlerLibrary.java:81)
[javac] at lombok.javac.HandlerLibrary.handleAnnotation(HandlerLibrary.java:185)
[javac] at lombok.javac.JavacTransformer$AnnotationVisitor.visitAnnotationOnType(JavacTransformer.java:88)
[javac] at lombok.javac.JavacNode.traverse(JavacNode.java:104)
[javac] at lombok.javac.JavacAST.traverseChildren(JavacAST.java:122)
[javac] at lombok.javac.JavacNode.traverse(JavacNode.java:67)
[javac] at lombok.javac.JavacAST.traverseChildren(JavacAST.java:122)
[javac] at lombok.javac.JavacNode.traverse(JavacNode.java:62)
[javac] at lombok.javac.JavacAST.traverse(JavacAST.java:117)
[javac] at lombok.javac.JavacTransformer.transform(JavacTransformer.java:72)
[javac] at lombok.javac.apt.Processor.process(Processor.java:217)
[javac] at lombok.core.AnnotationProcessor$JavacDescriptor.process(AnnotationProcessor.java:117)
[javac] at lombok.core.AnnotationProcessor.process(AnnotationProcessor.java:169)
[javac] at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:627)
[javac] at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:556)
[javac] at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:701)
[javac] at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:987)
[javac] at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:727)
[javac] at com.sun.tools.javac.main.Main.compile(Main.java:353)
[javac] at com.sun.tools.javac.main.Main.compile(Main.java:279)
[javac] at com.sun.tools.javac.main.Main.compile(Main.java:270)
[javac] at com.sun.tools.javac.Main.compile(Main.java:69)
[javac] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[javac] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[javac] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[javac] at java.lang.reflect.Method.invoke(Method.java:597)
[javac] at org.apache.tools.ant.taskdefs.compilers.Javac13.execute(Javac13.java:56)
[javac] at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:1134)
[javac] at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:912)
[javac] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
[javac] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[javac] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[javac] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[javac] at java.lang.reflect.Method.invoke(Method.java:597)
[javac] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[javac] at org.apache.tools.ant.Task.perform(Task.java:348)
[javac] at org.apache.tools.ant.Target.execute(Target.java:390)
[javac] at org.apache.tools.ant.Target.performTasks(Target.java:411)
[javac] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
[javac] at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
[javac] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[javac] at org.eclipse.ant.internal.launching.remote.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
[javac] at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
[javac] at org.eclipse.ant.internal.launching.remote.InternalAntRunner.run(InternalAntRunner.java:424)
[javac] at org.eclipse.ant.internal.launching.remote.InternalAntRunner.main(InternalAntRunner.java:138)
[javac] 5 errors