From 2043399d3916cf5c1b34b9552394f25d58068008 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Sat, 14 Aug 2010 04:05:27 +0200 Subject: delombok added type parameters to constructors that mirror the type's own type parameters. This resulted in delombok turning any generated constructor that takes at least 1 parameter of type 'T' into something that didn't compile, and to boot, a confusing error message. This is now fixed. Fixes issue #140. --- src/core/lombok/javac/handlers/HandleConstructor.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/core/lombok/javac') diff --git a/src/core/lombok/javac/handlers/HandleConstructor.java b/src/core/lombok/javac/handlers/HandleConstructor.java index 36deb013..c2332974 100644 --- a/src/core/lombok/javac/handlers/HandleConstructor.java +++ b/src/core/lombok/javac/handlers/HandleConstructor.java @@ -175,7 +175,6 @@ public class HandleConstructor { private JCMethodDecl createConstructor(AccessLevel level, JavacNode typeNode, List fields, boolean suppressConstructorProperties) { TreeMaker maker = typeNode.getTreeMaker(); - JCClassDecl type = (JCClassDecl) typeNode.get(); List nullChecks = List.nil(); List assigns = List.nil(); @@ -203,7 +202,7 @@ public class HandleConstructor { } return maker.MethodDef(mods, typeNode.toName(""), - null, type.typarams, params, List.nil(), maker.Block(0L, nullChecks.appendList(assigns)), null); + null, List.nil(), params, List.nil(), maker.Block(0L, nullChecks.appendList(assigns)), null); } private boolean isLocalType(JavacNode type) { -- cgit